Guest User

Untitled

a guest
Oct 11th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #![allow(unused)]
  2.  
  3. use std::{io};
  4.  
  5. fn foo() -> Result<Box<io::Read>, io::Error> {
  6. return Ok(Box::new(io::Cursor::new("hi".to_string())));
  7. }
  8.  
  9. fn main() {
  10. let x = foo().unwrap_err();
  11. }
Add Comment
Please, Sign In to add comment