1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-14 19:16:17 +00:00

refactor ~ replace deprecated trim_{left,right}... with trim_{start,end}...

- `trim_{start,end}{,_matches}` stabilized in rust v1.30.0
- `trim_{start,end}{,_matches}` deprecated (with compiler warnings) in rust v1.33.0

+ requires MinSRV >= v1.30.0

* ref: https://github.com/rust-lang/rust/blob/master/RELEASES.md
This commit is contained in:
Roy Ivy III 2019-12-22 17:13:30 -06:00
parent b4b0ee40d7
commit 45a04ce5fc
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -29,7 +29,7 @@ pub fn absolute_path(path: &Path) -> io::Result<PathBuf> {
path_buf
.as_path()
.to_string_lossy()
.trim_left_matches(r"\\?\"),
.trim_start_matches(r"\\?\"),
).to_path_buf();
Ok(path_buf)