refactor: misc clippy suggestions

This commit is contained in:
Greg Heartsfield
2022-09-24 09:01:09 -05:00
parent ccf9b8d47b
commit a98708ba47
7 changed files with 42 additions and 32 deletions
+3 -3
View File
@@ -23,10 +23,10 @@ pub struct Close {
impl From<CloseCmd> for Result<Close> {
fn from(cc: CloseCmd) -> Result<Close> {
// ensure command is correct
if cc.cmd != "CLOSE" {
Err(Error::CommandUnknownError)
} else {
if cc.cmd == "CLOSE" {
Ok(Close { id: cc.id })
} else {
Err(Error::CommandUnknownError)
}
}
}