mirror of
https://github.com/arampoire/nut-rs.git
synced 2025-11-30 16:20:25 -05:00
Fix clippy error
This commit is contained in:
parent
f3d9195bc4
commit
2fd8ffd170
1 changed files with 5 additions and 7 deletions
|
|
@ -49,14 +49,12 @@ impl<'a> TryFrom<&'a str> for UpsdName<'a> {
|
|||
} else {
|
||||
hostname = prefix;
|
||||
}
|
||||
} else if value.contains('@') {
|
||||
let mut split = value.splitn(2, '@');
|
||||
upsname = Some(split.next().unwrap());
|
||||
hostname = split.next().unwrap();
|
||||
} else {
|
||||
if value.contains('@') {
|
||||
let mut split = value.splitn(2, '@');
|
||||
upsname = Some(split.next().unwrap());
|
||||
hostname = split.next().unwrap();
|
||||
} else {
|
||||
upsname = Some(value);
|
||||
}
|
||||
upsname = Some(value);
|
||||
}
|
||||
|
||||
Ok(UpsdName {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue