Format
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user