SergioBenitez / version_check

Rust library for checking the installed/running rustc's version.
https://docs.rs/version_check
Apache License 2.0
50 stars 14 forks source link

rustc warning: trim_right -> trim_end #10

Closed trivikr closed 5 years ago

trivikr commented 5 years ago

The following error is shown while using version_check as a dependency:

warning: use of deprecated item 'core::str::<impl str>::trim_right': superseded by `trim_end`
  --> /home/trivikr/.cargo/registry/src/github.com-1ecc6299db9ec823/version_check-0.1.5/src/lib.rs:92:44
   |
92 |     let date = components.nth(1).map(|s| s.trim_right().trim_right_matches(")"));
   |                                            ^^^^^^^^^^ help: replace the use of the deprecated item: `trim_end`
   |
   = note: #[warn(deprecated)] on by default

warning: use of deprecated item 'core::str::<impl str>::trim_right_matches': superseded by `trim_end_matches`
  --> /home/trivikr/.cargo/registry/src/github.com-1ecc6299db9ec823/version_check-0.1.5/src/lib.rs:92:57
   |
92 |     let date = components.nth(1).map(|s| s.trim_right().trim_right_matches(")"));
   |                                                         ^^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated item: `trim_end_matches`

It needs to be updated at https://github.com/SergioBenitez/version_check/blob/98871bdc8e821f521adba203d414dd09a784ffeb/src/lib.rs#L91-L92

trivikr commented 5 years ago

This was fixed in https://github.com/SergioBenitez/version_check/commit/98871bdc8e821f521adba203d414dd09a784ffeb