Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::error::Error as StdError;
- use std::result::Result as StdResult;
- type Result<T> = StdResult<T, Box<StdError>>;
- fn main() -> Result<()> {
- let foo = &[];
- let bar: &[u8] = &[];
- let () = foo; // foo is [{integer}; 0]-- an array(!), not a slice
- let () = bar; // bar is a slice; what's up with foo?
- Ok(())
- }
Add Comment
Please, Sign In to add comment