Skip to content

Commit

Permalink
str::strip_suffix() is 1.45.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed May 17, 2021
1 parent b51688a commit 1385f99
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ops/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ impl PackageConfig {
let x = x.as_ref();

res.push("--bin".into());
res.push(x.strip_suffix(".exe").unwrap_or(x).to_string().into());
res.push(if x.ends_with(".exe") {
&x[..x.len() - 4]
} else {
x
}.to_string().into());
}
}
if let Some(true) = self.debug {
Expand Down

0 comments on commit 1385f99

Please sign in to comment.