I like aligning things

This commit is contained in:
Ben S 2014-11-24 02:12:52 +00:00
parent d72be30c30
commit 5b7124bb71
6 changed files with 22 additions and 27 deletions

View File

@ -25,12 +25,8 @@ impl<'a> Dir<'a> {
for path in self.contents.iter() { for path in self.contents.iter() {
match File::from_path(path, self) { match File::from_path(path, self) {
Ok(file) => { Ok(file) => files.push(file),
files.push(file); Err(e) => println!("{}: {}", path.display(), e),
}
Err(e) => {
println!("{}: {}", path.display(), e);
}
} }
} }

View File

@ -118,7 +118,8 @@ impl Options {
fn should_display(&self, f: &File) -> bool { fn should_display(&self, f: &File) -> bool {
if self.show_invisibles { if self.show_invisibles {
true true
} else { }
else {
!f.name.as_slice().starts_with(".") !f.name.as_slice().starts_with(".")
} }
} }

View File

@ -1,4 +1,3 @@
mod c { mod c {
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
extern crate libc; extern crate libc;
@ -22,7 +21,6 @@ mod c {
// Unfortunately the actual command is not standardised... // Unfortunately the actual command is not standardised...
#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(any(target_os = "linux", target_os = "android"))]
static TIOCGWINSZ: c_ulong = 0x5413; static TIOCGWINSZ: c_ulong = 0x5413;
#[cfg(any(target_os = "macos", target_os = "ios"))] #[cfg(any(target_os = "macos", target_os = "ios"))]

View File

@ -116,7 +116,7 @@ impl Unix {
if username == ptr::null() { if username == ptr::null() {
return false; return false;
} }
if unsafe { from_buf(username as *const u8) } == *uname { else if unsafe { from_buf(username as *const u8) } == *uname {
return true; return true;
} }
else { else {