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 --- .../tests/installer/installation_manager_test.rs | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'crates/shirabe/tests/installer/installation_manager_test.rs') diff --git a/crates/shirabe/tests/installer/installation_manager_test.rs b/crates/shirabe/tests/installer/installation_manager_test.rs index bc1fcfdc..e3e4c0fc 100644 --- a/crates/shirabe/tests/installer/installation_manager_test.rs +++ b/crates/shirabe/tests/installer/installation_manager_test.rs @@ -14,8 +14,6 @@ use shirabe::util::http_downloader::HttpDownloader; use shirabe::util::r#loop::Loop; use shirabe_php_shim::PhpMixed; use shirabe_semver::VersionParser; -use std::cell::RefCell; -use std::rc::Rc; fn run(future: F) -> F::Output { tokio::runtime::Builder::new_current_thread() @@ -27,17 +25,23 @@ fn run(future: F) -> F::Output { /// ref: setUp(): the PHP loop/io mocks are never exercised by these tests (the loop has its /// constructor disabled), so a real Loop over a real HttpDownloader and a NullIO stand in. struct SetUp { - loop_: Rc>, - io: Rc>, + loop_: std::rc::Rc>, + io: std::rc::Rc>, } fn set_up() -> SetUp { - let io: Rc> = Rc::new(RefCell::new(NullIO::new())); - let config = Rc::new(RefCell::new(shirabe::config::Config::new(false, None))); + let io: std::rc::Rc> = + std::rc::Rc::new(std::cell::RefCell::new(NullIO::new())); + let config = std::rc::Rc::new(std::cell::RefCell::new(shirabe::config::Config::new( + false, None, + ))); // The PHP loop mock has its constructor disabled and is never exercised by these tests, so a // mock HttpDownloader (no real curl backend) stands in. - let http_downloader = Rc::new(RefCell::new(HttpDownloader::__new_mock(io.clone(), config))); - let loop_ = Rc::new(RefCell::new(Loop::new(http_downloader, None))); + let http_downloader = std::rc::Rc::new(std::cell::RefCell::new(HttpDownloader::__new_mock( + io.clone(), + config, + ))); + let loop_ = std::rc::Rc::new(std::cell::RefCell::new(Loop::new(http_downloader, None))); SetUp { loop_, io } } @@ -150,12 +154,12 @@ struct BinaryInstallerCalls { #[derive(Debug)] struct BinaryInstaller { - calls: Rc>, + calls: std::rc::Rc>, } impl BinaryInstaller { - fn new() -> (Self, Rc>) { - let calls = Rc::new(RefCell::new(BinaryInstallerCalls::default())); + fn new() -> (Self, std::rc::Rc>) { + let calls = std::rc::Rc::new(std::cell::RefCell::new(BinaryInstallerCalls::default())); ( Self { calls: calls.clone(), @@ -262,7 +266,7 @@ fn typed_package(name: &str, version: &str, r#type: &str) -> PackageInterfaceHan } fn same_handle(a: &PackageInterfaceHandle, b: &PackageInterfaceHandle) -> bool { - Rc::ptr_eq(a.as_rc(), b.as_rc()) + std::rc::Rc::ptr_eq(a.as_rc(), b.as_rc()) } #[test] -- cgit v1.3.1