Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
quick_error! {
enum DocsError {
Io(path: PathBuf, io::Error) {
context(path: &Path, err: io::Error)
-> (path.to_path_buf(), err)
Format(path: PathBuf, lineno: usize, doc::FormatError) {
context(file_line: (&Path, usize), err: io::Error)
-> (file_line.0.to_path_buf(), file_line.1, err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment