Last active
May 29, 2016 23:17
-
-
Save tailhook/f80c0ed6935cd907268ac7e123bf90bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn render_docs(source: &Path, dest: &Path) -> Result<(), io::Error> { | |
for entry_res in try!(read_dir(source)) { | |
let entry = try!(entry_res); | |
let file = try!(File::open(&entry.path()); | |
for line_res in file.lines() { | |
let line = try!(line_res); | |
// ... | |
if wrong_syntax_flag { | |
return Err(io::Error::new(io::ErrorKind::Other, | |
"Wrong syntax")); | |
} | |
} | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment