We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cbd3cc commit b26770fCopy full SHA for b26770f
examples/context.rs
@@ -1,19 +1,14 @@
1
-#[macro_use(quick_error)] extern crate quick_error;
2
-
3
-use std::io::{self, stderr, Read, Write};
4
-use std::fs::File;
+use quick_error::{quick_error, ResultExt};
5
use std::env;
+use std::fs::File;
+use std::io::{self, stderr, Read, Write};
6
use std::num::ParseIntError;
7
use std::path::{Path, PathBuf};
8
9
-use quick_error::ResultExt;
10
11
quick_error! {
12
#[derive(Debug)]
13
pub enum Error {
14
- NoFileName {
15
- description("no file name specified")
16
- }
+ NoFileName {}
17
Io(err: io::Error, path: PathBuf) {
18
display("could not read file {:?}: {}", path, err)
19
context(path: &'a Path, err: io::Error)
0 commit comments