rust: fix darwin build
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>
Mon, 18 Nov 2024 15:42:09 +0100
changeset 52314 33d8cb64e9da
parent 52313 56e8841a454c
child 52315 d49144a1422f
rust: fix darwin build
rust/hg-core/src/revlog/options.rs
rust/hg-core/src/vfs.rs
--- a/rust/hg-core/src/revlog/options.rs	Mon Nov 04 15:28:32 2024 +0100
+++ b/rust/hg-core/src/revlog/options.rs	Mon Nov 18 15:42:09 2024 +0100
@@ -113,7 +113,7 @@
 
 /// There is a of populating mmaps for Windows, but it would need testing.
 #[cfg(not(target_os = "linux"))]
-const fn can_populate_mmap() {
+const fn can_populate_mmap() -> bool {
     false
 }
 
--- a/rust/hg-core/src/vfs.rs	Mon Nov 04 15:28:32 2024 +0100
+++ b/rust/hg-core/src/vfs.rs	Mon Nov 18 15:42:09 2024 +0100
@@ -37,7 +37,8 @@
         // setting it? Doesn't this affect all threads in this tiny window?
         let mask = libc::umask(0);
         libc::umask(mask);
-        mask & 0o777
+        #[allow(clippy::useless_conversion)]
+        (mask & 0o777).into()
     })
 }