Guest User

Untitled

a guest
Jun 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. use std::error::Error as StdError;
  2. use std::result::Result as StdResult;
  3. type Result<T> = StdResult<T, Box<StdError>>;
  4.  
  5. fn main() -> Result<()> {
  6. let foo = &[];
  7. let bar: &[u8] = &[];
  8. let () = foo; // foo is [{integer}; 0]-- an array(!), not a slice
  9. let () = bar; // bar is a slice; what's up with foo?
  10. Ok(())
  11. }
Add Comment
Please, Sign In to add comment