Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum committed Nov 1, 2023
1 parent 0da2daa commit ab045db
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rsync-fetcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async fn main() -> Result<()> {
info!(?stat, "transfer plan stat.");
progress.set_length(stat.total_bytes);
let transfer_items = Arc::new(transfer_items);
let (_, mut generator, mut receiver, _) = tokio::try_join!(
let ((), mut generator, mut receiver, ()) = tokio::try_join!(
tokio::spawn({
let transfer_items = transfer_items.clone();
async move { downloader.tasks(&transfer_items).await }
Expand Down
1 change: 1 addition & 0 deletions rsync-fetcher/src/rsync/checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ fn checksum_payload_(

#[cfg(test)]
mod tests {
#![allow(clippy::ignored_unit_patterns)]
use std::io::{Seek, SeekFrom, Write};

use proptest::prop_assert_eq;
Expand Down
3 changes: 1 addition & 2 deletions rsync-fetcher/src/rsync/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ impl<T: AsyncBufRead + Unpin> AsyncRead for EnvelopeRead<T> {
match b4 {
7 => (),
t => {
let mut errbuf = vec![];
errbuf.resize(self.frame_remaining, 0);
let errbuf = vec![0; self.frame_remaining];
self.pending_error = Some((t, errbuf));
return self.poll_err(ctx, buf);
}
Expand Down
2 changes: 1 addition & 1 deletion rsync-gateway/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl Expiry<Vec<u8>, Arc<MaybeCompressed>> for ExpiryPolicy {

#[cfg(test)]
mod tests {
#![allow(clippy::explicit_deref_methods)]
#![allow(clippy::explicit_deref_methods, clippy::ignored_unit_patterns)]

use std::future::ready;

Expand Down
2 changes: 1 addition & 1 deletion rsync-gateway/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ fn req_path_to_root_href(prefix: &str, req_path: &[u8]) -> String {

#[cfg(test)]
mod tests {
#![allow(clippy::explicit_deref_methods)]
#![allow(clippy::explicit_deref_methods, clippy::ignored_unit_patterns)]

use std::sync::atomic::{AtomicBool, Ordering};
use std::time::Duration;
Expand Down
2 changes: 1 addition & 1 deletion rsync-gateway/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<T> ArchiveWith<T> for SkipRkyv {
type Archived = ();
type Resolver = ();

unsafe fn resolve_with(_: &T, _: usize, _: Self::Resolver, _: *mut Self::Archived) {
unsafe fn resolve_with(_: &T, _: usize, (): Self::Resolver, _: *mut Self::Archived) {
panic!("Attempted to resolve a field explicitly skipped")
}
}
Expand Down
2 changes: 1 addition & 1 deletion rsync-gc/src/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub async fn bulk_delete_objs(op: &Operator, opts: &Opts, hashes: &[[u8; 20]]) -
.iter()
.map(|hash| format!("{prefix}{:x}", hash.as_hex()))
.collect();
op.remove(keys).map_ok(|_| pb.inc(chunk.len() as u64))
op.remove(keys).map_ok(|()| pb.inc(chunk.len() as u64))
}))
.buffer_unordered(DELETE_CONN)
.try_collect::<()>()
Expand Down

0 comments on commit ab045db

Please sign in to comment.