changeset 49920:0d301f4180f5

rust-clippy: use `write_all` since we're not expecting a partial write Clippy caught this. This is a good lint in general, but here this was not really a bug in this example code.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 18:15:29 +0100
parents bd42bd6eae45
children 5fff90c7ea9d
files rust/hg-core/examples/nodemap/main.rs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/examples/nodemap/main.rs	Mon Jan 09 18:09:26 2023 +0100
+++ b/rust/hg-core/examples/nodemap/main.rs	Mon Jan 09 18:15:29 2023 +0100
@@ -40,7 +40,7 @@
         nm.insert(index, index.node(rev).unwrap(), rev).unwrap();
     }
     eprintln!("Nodemap constructed in RAM in {:?}", start.elapsed());
-    file.write(&nm.into_readonly_and_added_bytes().1)?;
+    file.write_all(&nm.into_readonly_and_added_bytes().1)?;
     eprintln!("Nodemap written to disk");
     Ok(())
 }