Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
babymotte committed Jul 15, 2024
1 parent ceef9fb commit 47ca39c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions worterbuch-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ async fn connect_tcp<F: Future<Output = ()> + Send + 'static>(
}
Ok(Some(line)) => {
let msg = json::from_str::<SM>(&line);
let msg = match msg {
match msg {
Ok(SM::Welcome(welcome)) => {
log::debug!("Welcome message received: {welcome:?}");
welcome
Expand All @@ -870,8 +870,7 @@ async fn connect_tcp<F: Future<Output = ()> + Send + 'static>(
format!("error parsing welcome message '{line}': {e}"),
)))
}
};
msg
}
}
Err(e) => return Err(ConnectionError::IoError(e)),
},
Expand Down Expand Up @@ -984,7 +983,7 @@ async fn connect_unix<F: Future<Output = ()> + Send + 'static>(
}
Ok(Some(line)) => {
let msg = json::from_str::<SM>(&line);
let msg = match msg {
match msg {
Ok(SM::Welcome(welcome)) => {
log::debug!("Welcome message received: {welcome:?}");
welcome
Expand All @@ -1001,8 +1000,7 @@ async fn connect_unix<F: Future<Output = ()> + Send + 'static>(
format!("error parsing welcome message '{line}': {e}"),
)))
}
};
msg
}
}
Err(e) => return Err(ConnectionError::IoError(e)),
},
Expand Down

0 comments on commit 47ca39c

Please sign in to comment.