Created
April 23, 2018 00:04
-
-
Save rust-play/6c68e3fe5cbc79ff1eee6bd2f441c170 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
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
use std::error::Error; | |
fn foo() -> Result<(), Box<Error + Send + Sync>> { | |
unimplemented!() | |
} | |
fn bar() -> Result<(), Box<Error>> { | |
foo().map_err(|e| e as Box<Error>)?; | |
Ok(()) | |
} | |
fn main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment