Skip to content

Commit 21b5cbe

Browse files
removing compiler warnings
1 parent 03f147f commit 21b5cbe

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/diskio/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ impl Item {
347347
}
348348

349349
/// Set the priority of this I/O operation
350+
/// remove for now
351+
#[allow(dead_code)]
350352
pub(crate) fn with_priority(mut self, priority: IOPriority) -> Self {
351353
self.priority = priority;
352354
self

src/diskio/threaded.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,13 @@ impl Iterator for JoinIterator<'_, '_> {
521521
}
522522
}
523523

524+
#[allow(dead_code)]
524525
struct SubmitIterator<'a, 'b> {
525526
executor: &'a Threaded<'b>,
526527
item: Cell<Option<Item>>,
527528
}
528529

530+
#[allow(dead_code)]
529531
impl Iterator for SubmitIterator<'_, '_> {
530532
type Item = CompletedIo;
531533

src/dist/download.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::path::{Path, PathBuf};
44
use std::sync::Arc;
55
use std::collections::HashMap;
66
use anyhow::{Context, Result, anyhow};
7-
use futures::future::{join_all, FutureExt};
7+
use futures::future::FutureExt;
88
use sha2::{Digest, Sha256};
99
use tokio::sync::Semaphore;
1010
use tracing::{debug, info};
@@ -134,9 +134,6 @@ impl<'a> DownloadCfg<'a> {
134134

135135
// Clone data needed for the download to make it thread-safe
136136
let url = url.clone();
137-
let download_dir = self.download_dir.to_owned();
138-
let partial_file_path_clone = partial_file_path.clone();
139-
let target_file_clone = target_file.clone();
140137
let hash_str = hash.to_string();
141138

142139
// Create a thread-safe notification handler wrapper
@@ -210,7 +207,8 @@ impl<'a> DownloadCfg<'a> {
210207
}
211208
}
212209

213-
// Download multiple files concurrently
210+
// Mark this method as #[allow(dead_code)] to suppress the unused warning
211+
#[allow(dead_code)]
214212
pub(crate) async fn download_many(&self, urls_and_hashes: Vec<(&Url, &str)>) -> Result<Vec<File>> {
215213
// Create a vector to store results
216214
let mut files = Vec::with_capacity(urls_and_hashes.len());

src/download/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
//! Easy file downloading
22
3-
use std::fs;
43
use std::fs::OpenOptions;
54
use std::fs::remove_file;
6-
use std::ops;
7-
use std::path::{Path, PathBuf};
5+
use std::path::Path;
86
use std::sync::Arc;
97
use std::sync::atomic::{AtomicBool, Ordering};
108
use anyhow::Context;

0 commit comments

Comments
 (0)