소스 검색

Update the type of Unix permission bits

Ben S 10 년 전
부모
커밋
c642f8cbbd
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/file.rs

+ 2 - 2
src/file.rs

@@ -431,8 +431,8 @@ impl<'a> File<'a> {
     }
 
     /// Helper method for the permissions string.
-    fn permission_bit(bits: i32, bit: Permission, character: &'static str, style: Style) -> ANSIString<'static> {
-        let bi32 = bit as i32;
+    fn permission_bit(bits: u16, bit: Permission, character: &'static str, style: Style) -> ANSIString<'static> {
+        let bi32 = bit as u16;
         if bits & bi32 == bi32 {
             style.paint(character)
         }