diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
commit | 4f9fe856a25ab29345b90e7725509e9ee38a37be (patch) | |
tree | e4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /vendor/zip/examples/write_sample.rs | |
parent | Adding upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-5cd5bd4daf55da04d2c8e7c06c3067a027cfbfc2.tar.xz rustc-5cd5bd4daf55da04d2c8e7c06c3067a027cfbfc2.zip |
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/zip/examples/write_sample.rs')
-rw-r--r-- | vendor/zip/examples/write_sample.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/zip/examples/write_sample.rs b/vendor/zip/examples/write_sample.rs index b5749509e..2e45cb1ea 100644 --- a/vendor/zip/examples/write_sample.rs +++ b/vendor/zip/examples/write_sample.rs @@ -14,8 +14,8 @@ fn real_main() -> i32 { let filename = &*args[1]; match doit(filename) { - Ok(_) => println!("File written to {}", filename), - Err(e) => println!("Error: {:?}", e), + Ok(_) => println!("File written to {filename}"), + Err(e) => println!("Error: {e:?}"), } 0 @@ -23,7 +23,7 @@ fn real_main() -> i32 { fn doit(filename: &str) -> zip::result::ZipResult<()> { let path = std::path::Path::new(filename); - let file = std::fs::File::create(&path).unwrap(); + let file = std::fs::File::create(path).unwrap(); let mut zip = zip::ZipWriter::new(file); |