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/downloader/fossil_downloader_test.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'crates/shirabe/tests/downloader/fossil_downloader_test.rs') diff --git a/crates/shirabe/tests/downloader/fossil_downloader_test.rs b/crates/shirabe/tests/downloader/fossil_downloader_test.rs index 912b4b47..eed3d7fb 100644 --- a/crates/shirabe/tests/downloader/fossil_downloader_test.rs +++ b/crates/shirabe/tests/downloader/fossil_downloader_test.rs @@ -12,8 +12,6 @@ use shirabe::util::ProcessExecutor; use shirabe::util::filesystem::{Filesystem, FilesystemMock}; use shirabe_php_shim::PhpMixed; use shirabe_semver::VersionParser; -use std::cell::RefCell; -use std::rc::Rc; use tempfile::TempDir; fn run(future: F) -> F::Output { @@ -67,20 +65,23 @@ fn get_package(source_reference: Option<&str>, source_url: Option<&str>) -> Pack /// ref: FossilDownloaderTest::getDownloaderMock fn get_downloader_mock( - io: Option>>, + io: Option>>, config: Option, - process: Rc>, - filesystem: Option>>, + process: std::rc::Rc>, + filesystem: Option>>, ) -> FossilDownloader { - let io = - io.unwrap_or_else(|| Rc::new(RefCell::new(IOStub::new())) as Rc>); + let io = io.unwrap_or_else(|| { + std::rc::Rc::new(std::cell::RefCell::new(IOStub::new())) + as std::rc::Rc> + }); // ref: getConfig(['secure-http' => false]) - let config = Rc::new(RefCell::new(config.unwrap_or_else(|| { + let config = std::rc::Rc::new(std::cell::RefCell::new(config.unwrap_or_else(|| { ConfigStubBuilder::new() .with("secure-http", PhpMixed::Bool(false)) .build() }))); - 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)))); FossilDownloader::new(io, config, process, fs) } @@ -232,7 +233,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