comparison rust/hg-core/src/dirstate_tree/on_disk.rs @ 50274:0cc19a53cef4 stable

rust: fix building on macOS (issue6801) The VFS change is copied over from Cargo, and likely to apply to other platforms as well. The dirstate change is essentially a replay of 440972d2175d, which was reverted in e98fd81bb151, part of !383, to silence some clippy warnings.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 07 Mar 2023 13:39:31 +0100
parents a6b8b1ab9116
children d58e754f2db0
comparison
equal deleted inserted replaced
50273:5069a89a936e 50274:0cc19a53cef4
413 } 413 }
414 } 414 }
415 415
416 fn synthesize_unix_mode(&self) -> u32 { 416 fn synthesize_unix_mode(&self) -> u32 {
417 let file_type = if self.flags().contains(Flags::MODE_IS_SYMLINK) { 417 let file_type = if self.flags().contains(Flags::MODE_IS_SYMLINK) {
418 libc::S_IFLNK 418 libc::S_IFLNK as u32
419 } else { 419 } else {
420 libc::S_IFREG 420 libc::S_IFREG as u32
421 }; 421 };
422 let permissions = if self.flags().contains(Flags::MODE_EXEC_PERM) { 422 let permissions = if self.flags().contains(Flags::MODE_EXEC_PERM) {
423 0o755 423 0o755
424 } else { 424 } else {
425 0o644 425 0o644