Use is_ok() instead of empty Ok(_)

Signed-off-by: wcampbell <wcampbell1995@gmail.com>
This commit is contained in:
wcampbell 2020-10-13 17:01:50 -04:00
parent a93f58f5e6
commit 964a5ac962
No known key found for this signature in database
GPG key ID: A040F4DAFC68FFE8

View file

@ -152,19 +152,13 @@ fn udp_clone_two_write() {
let (done, rx) = channel();
let tx2 = tx.clone();
let _t = thread::spawn(move || {
match sock3.send_to(&[1], &addr2) {
Ok(..) => {
let _ = tx2.send(());
}
Err(..) => {}
if sock3.send_to(&[1], &addr2).is_ok() {
let _ = tx2.send(());
}
done.send(()).unwrap();
});
match sock1.send_to(&[2], &addr2) {
Ok(..) => {
let _ = tx.send(());
}
Err(..) => {}
if sock1.send_to(&[2], &addr2).is_ok() {
let _ = tx.send(());
}
drop(tx);