\t and \s+$

This commit is contained in:
Benjamin Sago 2017-08-26 23:53:47 +01:00
parent 075fe802b4
commit d86fc4286b
12 changed files with 101 additions and 101 deletions

View File

@ -24,8 +24,8 @@ impl Git {
};
let statuses = repo.statuses(None)?.iter()
.map(|e| (workdir.join(Path::new(e.path().unwrap())), e.status()))
.collect();
.map(|e| (workdir.join(Path::new(e.path().unwrap())), e.status()))
.collect();
Ok(Git { statuses: statuses })
}

View File

@ -15,27 +15,27 @@ impl f::Blocks {
pub trait Colours {
fn block_count(&self) -> Style;
fn no_blocks(&self) -> Style;
fn block_count(&self) -> Style;
fn no_blocks(&self) -> Style;
}
#[cfg(test)]
pub mod test {
use ansi_term::Style;
use ansi_term::Colour::*;
use ansi_term::Style;
use ansi_term::Colour::*;
use super::Colours;
use super::Colours;
use output::cell::TextCell;
use fs::fields as f;
struct TestColours;
struct TestColours;
impl Colours for TestColours {
fn block_count(&self) -> Style { Red.blink() }
fn no_blocks(&self) -> Style { Green.italic() }
}
impl Colours for TestColours {
fn block_count(&self) -> Style { Red.blink() }
fn no_blocks(&self) -> Style { Green.italic() }
}
#[test]

View File

@ -43,7 +43,7 @@ pub trait Colours {
#[cfg(test)]
pub mod test {
use super::Colours;
use super::Colours;
use output::cell::{TextCell, DisplayWidth};
use fs::fields as f;

View File

@ -30,15 +30,15 @@ impl f::Group {
pub trait Colours {
fn yours(&self) -> Style;
fn not_yours(&self) -> Style;
fn yours(&self) -> Style;
fn not_yours(&self) -> Style;
}
#[cfg(test)]
#[allow(unused_results)]
pub mod test {
use super::Colours;
use super::Colours;
use fs::fields as f;
use output::cell::TextCell;
@ -52,8 +52,8 @@ pub mod test {
struct TestColours;
impl Colours for TestColours {
fn yours(&self) -> Style { Fixed(80).normal() }
fn not_yours(&self) -> Style { Fixed(81).normal() }
fn yours(&self) -> Style { Fixed(80).normal() }
fn not_yours(&self) -> Style { Fixed(81).normal() }
}

View File

@ -16,14 +16,14 @@ impl f::Links {
pub trait Colours {
fn normal(&self) -> Style;
fn multi_link_file(&self) -> Style;
fn normal(&self) -> Style;
fn multi_link_file(&self) -> Style;
}
#[cfg(test)]
pub mod test {
use super::Colours;
use super::Colours;
use output::cell::{TextCell, DisplayWidth};
use fs::fields as f;
@ -35,8 +35,8 @@ pub mod test {
struct TestColours;
impl Colours for TestColours {
fn normal(&self) -> Style { Blue.normal() }
fn multi_link_file(&self) -> Style { Blue.on(Red) }
fn normal(&self) -> Style { Blue.normal() }
fn multi_link_file(&self) -> Style { Blue.on(Red) }
}

View File

@ -78,25 +78,25 @@ impl f::Permissions {
pub trait Colours {
fn dash(&self) -> Style;
fn dash(&self) -> Style;
fn user_read(&self) -> Style;
fn user_write(&self) -> Style;
fn user_execute_file(&self) -> Style;
fn user_execute_other(&self) -> Style;
fn user_read(&self) -> Style;
fn user_write(&self) -> Style;
fn user_execute_file(&self) -> Style;
fn user_execute_other(&self) -> Style;
fn group_read(&self) -> Style;
fn group_write(&self) -> Style;
fn group_execute(&self) -> Style;
fn group_read(&self) -> Style;
fn group_write(&self) -> Style;
fn group_execute(&self) -> Style;
fn other_read(&self) -> Style;
fn other_write(&self) -> Style;
fn other_execute(&self) -> Style;
fn other_read(&self) -> Style;
fn other_write(&self) -> Style;
fn other_execute(&self) -> Style;
fn special_user_file(&self) -> Style;
fn special_other(&self) -> Style;
fn special_user_file(&self) -> Style;
fn special_other(&self) -> Style;
fn attribute(&self) -> Style;
fn attribute(&self) -> Style;
}
@ -114,20 +114,20 @@ pub mod test {
struct TestColours;
impl Colours for TestColours {
fn dash(&self) -> Style { Fixed(11).normal() }
fn user_read(&self) -> Style { Fixed(101).normal() }
fn user_write(&self) -> Style { Fixed(102).normal() }
fn user_execute_file(&self) -> Style { Fixed(103).normal() }
fn user_execute_other(&self) -> Style { Fixed(113).normal() }
fn group_read(&self) -> Style { Fixed(104).normal() }
fn group_write(&self) -> Style { Fixed(105).normal() }
fn group_execute(&self) -> Style { Fixed(106).normal() }
fn other_read(&self) -> Style { Fixed(107).normal() }
fn other_write(&self) -> Style { Fixed(108).normal() }
fn other_execute(&self) -> Style { Fixed(109).normal() }
fn special_user_file(&self) -> Style { Fixed(110).normal() }
fn special_other(&self) -> Style { Fixed(111).normal() }
fn attribute(&self) -> Style { Fixed(112).normal() }
fn dash(&self) -> Style { Fixed(11).normal() }
fn user_read(&self) -> Style { Fixed(101).normal() }
fn user_write(&self) -> Style { Fixed(102).normal() }
fn user_execute_file(&self) -> Style { Fixed(103).normal() }
fn user_execute_other(&self) -> Style { Fixed(113).normal() }
fn group_read(&self) -> Style { Fixed(104).normal() }
fn group_write(&self) -> Style { Fixed(105).normal() }
fn group_execute(&self) -> Style { Fixed(106).normal() }
fn other_read(&self) -> Style { Fixed(107).normal() }
fn other_write(&self) -> Style { Fixed(108).normal() }
fn other_execute(&self) -> Style { Fixed(109).normal() }
fn special_user_file(&self) -> Style { Fixed(110).normal() }
fn special_other(&self) -> Style { Fixed(111).normal() }
fn attribute(&self) -> Style { Fixed(112).normal() }
}

View File

@ -69,19 +69,19 @@ impl f::DeviceIDs {
pub trait Colours {
fn size(&self, size: u64) -> Style;
fn unit(&self) -> Style;
fn no_size(&self) -> Style;
fn size(&self, size: u64) -> Style;
fn unit(&self) -> Style;
fn no_size(&self) -> Style;
fn major(&self) -> Style;
fn comma(&self) -> Style;
fn minor(&self) -> Style;
fn major(&self) -> Style;
fn comma(&self) -> Style;
fn minor(&self) -> Style;
}
#[cfg(test)]
pub mod test {
use super::Colours;
use super::Colours;
use output::cell::{TextCell, DisplayWidth};
use output::table::SizeFormat;
use fs::fields as f;
@ -94,13 +94,13 @@ pub mod test {
struct TestColours;
impl Colours for TestColours {
fn size(&self, _size: u64) -> Style { Fixed(66).normal() }
fn unit(&self) -> Style { Fixed(77).bold() }
fn no_size(&self) -> Style { Black.italic() }
fn size(&self, _size: u64) -> Style { Fixed(66).normal() }
fn unit(&self) -> Style { Fixed(77).bold() }
fn no_size(&self) -> Style { Black.italic() }
fn major(&self) -> Style { Blue.on(Red) }
fn comma(&self) -> Style { Green.italic() }
fn minor(&self) -> Style { Cyan.on(Yellow) }
fn major(&self) -> Style { Blue.on(Red) }
fn comma(&self) -> Style { Green.italic() }
fn minor(&self) -> Style { Cyan.on(Yellow) }
}

View File

@ -21,15 +21,15 @@ impl f::User {
pub trait Colours {
fn you(&self) -> Style;
fn someone_else(&self) -> Style;
fn you(&self) -> Style;
fn someone_else(&self) -> Style;
}
#[cfg(test)]
#[allow(unused_results)]
pub mod test {
use super::Colours;
use super::Colours;
use fs::fields as f;
use output::cell::TextCell;
@ -42,8 +42,8 @@ pub mod test {
struct TestColours;
impl Colours for TestColours {
fn you(&self) -> Style { Red.bold() }
fn someone_else(&self) -> Style { Blue.underline() }
fn you(&self) -> Style { Red.bold() }
fn someone_else(&self) -> Style { Blue.underline() }
}