Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code shared from the Rust Playground
use std::convert::TryInto;
fn main() {
let x: i64 = -30;
let y: u64 = x.try_into().unwrap();
println!("{}", y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.