Skip to content

Commit

Permalink
Replace future deprecated call
Browse files Browse the repository at this point in the history
The trim_right_matches method is deprecating in 1.33 in favor of
trim_end_matches (see rust-lang/rust#52994).
  • Loading branch information
hug-dev committed Dec 18, 2018
1 parent ac72fa6 commit 4393051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ impl Build {
} else if self.get_host()? != target {
// CROSS_COMPILE is of the form: "arm-linux-gnueabi-"
let cc_env = self.getenv("CROSS_COMPILE");
let cross_compile = cc_env.as_ref().map(|s| s.trim_right_matches('-'));
let cross_compile = cc_env.as_ref().map(|s| s.trim_end_matches('-'));
let prefix = cross_compile.or(match &target[..] {
"aarch64-unknown-linux-gnu" => Some("aarch64-linux-gnu"),
"aarch64-unknown-linux-musl" => Some("aarch64-linux-musl"),
Expand Down

0 comments on commit 4393051

Please sign in to comment.