mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 02:08:09 +00:00
Replace starts_with and slice with trim_left_matches
This commit is contained in:
parent
c15b18bf5b
commit
77cc8d39c6
1 changed files with 1 additions and 5 deletions
|
@ -332,11 +332,7 @@ pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option<usize> {
|
|||
return None;
|
||||
}
|
||||
}
|
||||
let signal_name = if signal_name_or_value.starts_with("SIG") {
|
||||
&signal_name_or_value[3..]
|
||||
} else {
|
||||
&signal_name_or_value[..]
|
||||
};
|
||||
let signal_name = signal_name_or_value.trim_left_matches("SIG");
|
||||
|
||||
ALL_SIGNALS
|
||||
.iter()
|
||||
|
|
Loading…
Reference in a new issue