jD91mZM2 6 anni fa
parent
commit
64acfbb8e3
2 ha cambiato i file con 10 aggiunte e 6 eliminazioni
  1. 8 4
      src/header/pwd/mod.rs
  2. 2 2
      src/header/pwd/redox.rs

+ 8 - 4
src/header/pwd/mod.rs

@@ -8,11 +8,15 @@ use platform;
 use platform::types::*;
 use platform::{Line, RawFile, RawLineBuffer};
 
-#[cfg(target_os = "linux")] mod linux;
-#[cfg(target_os = "redox")] mod redox;
+#[cfg(target_os = "linux")]
+mod linux;
+#[cfg(target_os = "redox")]
+mod redox;
 
-#[cfg(target_os = "linux")] use self::linux as sys;
-#[cfg(target_os = "redox")] use self::redox as sys;
+#[cfg(target_os = "linux")]
+use self::linux as sys;
+#[cfg(target_os = "redox")]
+use self::redox as sys;
 
 #[repr(C)]
 pub struct passwd {

+ 2 - 2
src/header/pwd/redox.rs

@@ -5,11 +5,11 @@ pub fn split(line: &[u8]) -> [&[u8]; 7] {
     parts[0] = iter.next().unwrap_or(&[]);
     // Skip passwd
     for i in 0..2 {
-        parts[2+i] = iter.next().unwrap_or(&[]);
+        parts[2 + i] = iter.next().unwrap_or(&[]);
     }
     // Skip gecos
     for i in 0..2 {
-        parts[5+i] = iter.next().unwrap_or(&[]);
+        parts[5 + i] = iter.next().unwrap_or(&[]);
     }
     parts
 }