SHARE
TWEET

Untitled

a guest May 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::path::PathBuf;
  2.  
  3. #[derive(Debug)]
  4. struct Opts {
  5.     infile: PathBuf,
  6.     outfile: PathBuf,
  7. }
  8.  
  9. fn main() {
  10.     let opts = Opts {
  11.         infile: PathBuf::from("/home/ryan/infile.txt"),
  12.         outfile: PathBuf::from("/home/ryan/outfile.txt"),
  13.     };
  14.    
  15.     opts.infile = PathBuf::from("file.txt");
  16.    
  17.     println!("{:?}", opts);
  18. }
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