Skip to content

Commit

Permalink
MSRV fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Sep 18, 2024
1 parent 8ff2627 commit 26a9cf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ impl Error {
// The command name alone is not available in the Error enum.
fn trimmed_command(command: &str) -> &str {
let env_prefix = command
.split_inclusive(' ')
.split(' ')
.take_while(|arg| arg.starts_with("PKG_CONFIG") && arg.contains('='))
.map(|arg| arg.len())
.map(|arg| arg.len() + 1)
.sum::<usize>();
command[env_prefix..].split(" --").next().unwrap()
}
Expand Down

0 comments on commit 26a9cf0

Please sign in to comment.