diff --git a/src/diskio/mod.rs b/src/diskio/mod.rs index ebcc54a847..3a9369e836 100644 --- a/src/diskio/mod.rs +++ b/src/diskio/mod.rs @@ -65,7 +65,7 @@ use std::{ }; use anyhow::anyhow; -use tracing::{error, trace, warn}; +use tracing::{debug, error, trace, warn}; use crate::{ diskio::immediate::{FileState, IncrementalFileWriter}, @@ -474,12 +474,10 @@ pub(super) fn get_executor<'a>( fn effective_thread_count(ram_budget: usize, thread_count: IoThreadCount) -> usize { match thread_count { IoThreadCount::Default(n) if n > 1 && ram_budget < LOW_MEMORY_THRESHOLD => { - warn!( - "using single-threaded unpacking due to low memory \ - (ram budget: {} < {} threshold), \ - set RUSTUP_IO_THREADS to override", + debug!( + "using single-threaded unpacking due to low memory (ram budget: {} < {} threshold), set RUSTUP_IO_THREADS to override", Size::new(ram_budget), - Size::new(LOW_MEMORY_THRESHOLD) + Size::new(LOW_MEMORY_THRESHOLD), ); 1 } diff --git a/src/diskio/test.rs b/src/diskio/test.rs index 6f876d7d14..360cd6eb7a 100644 --- a/src/diskio/test.rs +++ b/src/diskio/test.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use super::{Executor, Item, Kind, get_executor}; +use super::{Item, Kind, get_executor}; use crate::{process::TestProcess, test::test_dir}; impl Item { @@ -21,8 +21,7 @@ fn test_incremental_file(io_threads: &str) -> anyhow::Result<()> { let mut written = 0; let mut file_finished = false; - let mut io_executor: Box = - get_executor(32 * 1024 * 1024, tp.process.io_thread_count()?); + let mut io_executor = get_executor(32 * 1024 * 1024, tp.process.io_thread_count()?); let (item, mut sender) = Item::write_file_segmented( work_dir.path().join("scratch"), 0o666, @@ -88,8 +87,7 @@ fn test_complete_file(io_threads: &str) -> anyhow::Result<()> { vars.insert("RUSTUP_IO_THREADS".to_string(), io_threads.to_string()); let tp = TestProcess::with_vars(vars); - let mut io_executor: Box = - get_executor(32 * 1024 * 1024, tp.process.io_thread_count()?); + let mut io_executor = get_executor(32 * 1024 * 1024, tp.process.io_thread_count()?); let mut chunk = io_executor.get_buffer(10); chunk.extend(b"0123456789"); assert_eq!(chunk.len(), 10);