SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. extern crate istring;
  2.  
  3. use istring::IString;
  4.  
  5. fn main() {
  6.     let foo: Vec<u8> = vec![1, 2, 3, 4, 5];
  7.     let foo_string = String::from_utf8(foo).unwrap();
  8.     let foo_attempt1 = IString::from(foo_string);
  9.     let foo_attempt2 = IString::from_utf8(foo).unwrap();
  10.     println!("foo is {:#}", foo_attempt2);
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top