Advertisement
Guest User

Untitled

a guest
May 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  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 mut 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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement