mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-28 07:57:02 +00:00
style: corrects the use of ';' to improve readability
- remove unnecessary semicolon and enable lint warning: unnecessary semicolon help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#unnecessary_semicolon - add `;` to the last statement for consitent formatting and enable lint `clippy::semicolon_if_nothing_returned` warning: consider adding a `;` to the last statement for consistent formatting help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#semicolon_if_nothing_returned
This commit is contained in:
+1
-1
@@ -277,7 +277,7 @@ impl Stream for CancelOnDropStream {
|
||||
let res = this.stream.poll_next(cx);
|
||||
if matches!(res, Poll::Ready(None)) {
|
||||
if let Some(c) = this.cancel.take() {
|
||||
std::mem::forget(c)
|
||||
std::mem::forget(c);
|
||||
}
|
||||
}
|
||||
res
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ where
|
||||
fn log_err(self, msg: &'static str) {
|
||||
if let Err(e) = self {
|
||||
error!("Error: {}: {}", msg, Into::<Error>::into(e));
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ impl NetApp {
|
||||
.is_some()
|
||||
{
|
||||
panic!("Redefining endpoint: {}", path);
|
||||
};
|
||||
}
|
||||
endpoint
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ pub(crate) trait RecvLoop: Sync + 'static {
|
||||
Ok(_) => (),
|
||||
Err(e) if e.kind() == std::io::ErrorKind::UnexpectedEof => break,
|
||||
Err(e) => return Err(e.into()),
|
||||
};
|
||||
}
|
||||
let id = RequestID::from_be_bytes(header_id);
|
||||
|
||||
let mut header_size = [0u8; ChunkLength::BITS as usize / 8];
|
||||
|
||||
+2
-2
@@ -319,7 +319,7 @@ pub(crate) trait SendLoop: Sync {
|
||||
order_tag,
|
||||
data: ByteStreamReader::new(data),
|
||||
sent: 0,
|
||||
})
|
||||
});
|
||||
}
|
||||
Some(SendItem::Cancel(id)) => {
|
||||
trace!("send_loop({}): cancelling {}", debug_name, id);
|
||||
@@ -332,7 +332,7 @@ pub(crate) trait SendLoop: Sync {
|
||||
None => {
|
||||
msg_recv = None;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
(id, data) = send_fut => {
|
||||
trace!(
|
||||
|
||||
+2
-2
@@ -15,12 +15,12 @@ use crate::NodeID;
|
||||
#[tokio::test(flavor = "current_thread")]
|
||||
async fn test_with_basic_scheduler() {
|
||||
pretty_env_logger::init();
|
||||
run_test(19980).await
|
||||
run_test(19980).await;
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
|
||||
async fn test_with_threaded_scheduler() {
|
||||
run_test(19990).await
|
||||
run_test(19990).await;
|
||||
}
|
||||
|
||||
async fn run_test(port_base: u16) {
|
||||
|
||||
Reference in New Issue
Block a user