about summary refs log tree commit diff
path: root/src/libgraphviz/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgraphviz/lib.rs')
-rw-r--r--src/libgraphviz/lib.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs
index f1317e80b03..d4d3ac93c97 100644
--- a/src/libgraphviz/lib.rs
+++ b/src/libgraphviz/lib.rs
@@ -662,7 +662,7 @@ pub fn render_opts<'a, N, E, G, W>(g: &'a G,
 {
     fn writeln<W: Write>(w: &mut W, arg: &[&str]) -> io::Result<()> {
         for &s in arg {
-            try!(w.write_all(s.as_bytes()));
+            w.write_all(s.as_bytes())?;
         }
         write!(w, "\n")
     }
@@ -671,9 +671,9 @@ pub fn render_opts<'a, N, E, G, W>(g: &'a G,
         w.write_all(b"    ")
     }
 
-    try!(writeln(w, &["digraph ", g.graph_id().as_slice(), " {"]));
+    writeln(w, &["digraph ", g.graph_id().as_slice(), " {"])?;
     for n in g.nodes().iter() {
-        try!(indent(w));
+        indent(w)?;
         let id = g.node_id(n);
 
         let escaped = &g.node_label(n).to_dot_string();
@@ -702,12 +702,12 @@ pub fn render_opts<'a, N, E, G, W>(g: &'a G,
         }
 
         text.push(";");
-        try!(writeln(w, &text));
+        writeln(w, &text)?;
     }
 
     for e in g.edges().iter() {
         let escaped_label = &g.edge_label(e).to_dot_string();
-        try!(indent(w));
+        indent(w)?;
         let source = g.source(e);
         let target = g.target(e);
         let source_id = g.node_id(&source);
@@ -729,7 +729,7 @@ pub fn render_opts<'a, N, E, G, W>(g: &'a G,
         }
 
         text.push(";");
-        try!(writeln(w, &text));
+        writeln(w, &text)?;
     }
 
     writeln(w, &["}"])
@@ -959,7 +959,7 @@ mod tests {
         let mut writer = Vec::new();
         render(&g, &mut writer).unwrap();
         let mut s = String::new();
-        try!(Read::read_to_string(&mut &*writer, &mut s));
+        Read::read_to_string(&mut &*writer, &mut s)?;
         Ok(s)
     }