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 --- crates/shirabe/tests/package/locker_test.rs | 31 +++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'crates/shirabe/tests/package/locker_test.rs') diff --git a/crates/shirabe/tests/package/locker_test.rs b/crates/shirabe/tests/package/locker_test.rs index bbc333e7..fc66293b 100644 --- a/crates/shirabe/tests/package/locker_test.rs +++ b/crates/shirabe/tests/package/locker_test.rs @@ -14,21 +14,24 @@ use shirabe::util::http_downloader::HttpDownloader; use shirabe::util::r#loop::Loop; use shirabe::util::process_executor::ProcessExecutor; use shirabe_php_shim::{LogicException, PhpMixed, hash}; -use std::cell::RefCell; -use std::rc::Rc; use tempfile::TempDir; -fn null_io() -> Rc> { - Rc::new(RefCell::new(NullIO::new())) +fn null_io() -> std::rc::Rc> { + std::rc::Rc::new(std::cell::RefCell::new(NullIO::new())) } -fn installation_manager(io: &Rc>) -> Rc> { +fn installation_manager( + io: &std::rc::Rc>, +) -> std::rc::Rc> { // These tests never reach Locker::get_package_time, so the InstallationManager is never // actually used; build it over a mock HttpDownloader to avoid the unimplemented curl backend. - let config = Rc::new(RefCell::new(Config::new(false, None))); - let http_downloader = Rc::new(RefCell::new(HttpDownloader::__new_mock(io.clone(), config))); - let r#loop = Rc::new(RefCell::new(Loop::new(http_downloader, None))); - Rc::new(RefCell::new(InstallationManager::new( + let config = std::rc::Rc::new(std::cell::RefCell::new(Config::new(false, None))); + let http_downloader = std::rc::Rc::new(std::cell::RefCell::new(HttpDownloader::__new_mock( + io.clone(), + config, + ))); + let r#loop = std::rc::Rc::new(std::cell::RefCell::new(Loop::new(http_downloader, None))); + std::rc::Rc::new(std::cell::RefCell::new(InstallationManager::new( r#loop, io.clone(), None, @@ -57,7 +60,11 @@ fn get_json_content(custom_data: &[(&str, &str)]) -> String { fn make_locker( json_content: &str, lock_contents: Option<&str>, -) -> (Locker, TempDir, Rc>) { +) -> ( + Locker, + TempDir, + std::rc::Rc>, +) { let temp_dir = TempDir::new().unwrap(); let lock_path = temp_dir.path().join("composer.lock"); if let Some(contents) = lock_contents { @@ -66,7 +73,9 @@ fn make_locker( let io = null_io(); let json_file = JsonFile::new(lock_path.to_string_lossy().into_owned(), None, None).unwrap(); - let process = Rc::new(RefCell::new(ProcessExecutor::new(Some(io.clone())))); + let process = std::rc::Rc::new(std::cell::RefCell::new(ProcessExecutor::new(Some( + io.clone(), + )))); let locker = Locker::new( io.clone(), json_file, -- cgit v1.3.1