diff --git a/src/fmt/parasplit.rs b/src/fmt/parasplit.rs index 5ffe4593e9e..499b3b04a63 100644 --- a/src/fmt/parasplit.rs +++ b/src/fmt/parasplit.rs @@ -436,7 +436,7 @@ impl<'a> ParaWords<'a> { fn create_words(&mut self) { if self.para.mail_header { // no extra spacing for mail headers; always exactly 1 space - // safe to trim_left on every line of a mail header, since the + // safe to trim_start on every line of a mail header, since the // first line is guaranteed not to have any spaces self.words.extend( self.para diff --git a/src/pwd/pwd.rs b/src/pwd/pwd.rs index e4658989dc4..c43fcf3869f 100644 --- a/src/pwd/pwd.rs +++ b/src/pwd/pwd.rs @@ -29,7 +29,7 @@ pub fn absolute_path(path: &Path) -> io::Result { path_buf .as_path() .to_string_lossy() - .trim_left_matches(r"\\?\"), + .trim_start_matches(r"\\?\"), ).to_path_buf(); Ok(path_buf) diff --git a/tests/common/util.rs b/tests/common/util.rs index 43e83f1e64e..addbe6b16e5 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -93,8 +93,8 @@ impl CmdResult { /// stdout_only is a better choice unless stderr may or will be non-empty pub fn stdout_is>(&self, msg: T) -> Box<&CmdResult> { assert_eq!( - String::from(msg.as_ref()), - self.stdout + String::from(msg.as_ref()).trim_end(), + self.stdout.trim_end() ); Box::new(self) }