mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-24 18:10:55 +00:00
remove clippy warning
This commit is contained in:
parent
be3d7e314b
commit
25d775af47
1 changed files with 3 additions and 3 deletions
|
@ -447,11 +447,11 @@ impl<'a> TunToProxy<'a> {
|
|||
|
||||
let mut buf = [0u8; 4096];
|
||||
let read_result = state.mio_stream.read(&mut buf);
|
||||
let read = if read_result.is_err() {
|
||||
let read = if let Ok(read_result) = read_result {
|
||||
read_result
|
||||
} else {
|
||||
error!("READ from proxy: {}", read_result.as_ref().err().unwrap());
|
||||
0
|
||||
} else {
|
||||
read_result.unwrap()
|
||||
};
|
||||
|
||||
if read == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue