Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. fn main() -> Result<(), Box<dyn std::error::Error>> {
  2. std::str::from_utf8(b"foobar")?; // <- works because of '?'
  3. // return std::str::from_utf8(b"foobar"); // <- does not work since error does not fit
  4. Ok(())
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement