Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::path::PathBuf;
- #[derive(Debug)]
- struct Opts {
- infile: PathBuf,
- outfile: PathBuf,
- }
- fn main() {
- let opts = Opts {
- infile: PathBuf::from("/home/ryan/infile.txt"),
- outfile: PathBuf::from("/home/ryan/outfile.txt"),
- };
- opts.infile = PathBuf::from("file.txt");
- println!("{:?}", opts);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement