From 27d00055df8691a6bd99aaf38633a7338b16cc6a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 11 Jul 2026 16:33:05 +0900 Subject: chore: use fully-qualified name for Rc/RefCell --- .../shirabe/tests/downloader/hg_downloader_test.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'crates/shirabe/tests/downloader/hg_downloader_test.rs') diff --git a/crates/shirabe/tests/downloader/hg_downloader_test.rs b/crates/shirabe/tests/downloader/hg_downloader_test.rs index e68dfc5e..d68812d8 100644 --- a/crates/shirabe/tests/downloader/hg_downloader_test.rs +++ b/crates/shirabe/tests/downloader/hg_downloader_test.rs @@ -10,8 +10,6 @@ use shirabe::package::handle::{CompletePackageHandle, PackageInterfaceHandle}; use shirabe::util::ProcessExecutor; use shirabe::util::filesystem::{Filesystem, FilesystemMock}; use shirabe_semver::VersionParser; -use std::cell::RefCell; -use std::rc::Rc; use tempfile::TempDir; fn run(future: F) -> F::Output { @@ -69,17 +67,20 @@ fn get_package(source_reference: Option<&str>, source_url: Option<&str>) -> Pack /// returns null for everything; a default real `Config` resolves the only /// relevant key (`secure-http`) compatibly for the https URLs used here. fn get_downloader_mock( - io: Option>>, + io: Option>>, config: Option, - process: Rc>, - filesystem: Option>>, + process: std::rc::Rc>, + filesystem: Option>>, ) -> HgDownloader { - let io = - io.unwrap_or_else(|| Rc::new(RefCell::new(IOStub::new())) as Rc>); - let config = Rc::new(RefCell::new( + let io = io.unwrap_or_else(|| { + std::rc::Rc::new(std::cell::RefCell::new(IOStub::new())) + as std::rc::Rc> + }); + let config = std::rc::Rc::new(std::cell::RefCell::new( config.unwrap_or_else(|| Config::new(false, None)), )); - let fs = filesystem.unwrap_or_else(|| Rc::new(RefCell::new(Filesystem::new(None)))); + let fs = filesystem + .unwrap_or_else(|| std::rc::Rc::new(std::cell::RefCell::new(Filesystem::new(None)))); HgDownloader::new(io, config, process, fs) } @@ -224,7 +225,7 @@ fn test_remove() { remove_directory_async_result: Some(true), ..Default::default() }); - let filesystem = Rc::new(RefCell::new(filesystem)); + let filesystem = std::rc::Rc::new(std::cell::RefCell::new(filesystem)); let mut downloader = get_downloader_mock(None, None, process, Some(filesystem.clone())); run(async { -- cgit v1.3.1