diff options
Diffstat (limited to 'crates/shirabe/tests/downloader/fossil_downloader_test.rs')
| -rw-r--r-- | crates/shirabe/tests/downloader/fossil_downloader_test.rs | 21 |
1 files changed, 11 insertions, 10 deletions
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<F: std::future::Future>(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<Rc<RefCell<dyn IOInterface>>>, + io: Option<std::rc::Rc<std::cell::RefCell<dyn IOInterface>>>, config: Option<Config>, - process: Rc<RefCell<ProcessExecutor>>, - filesystem: Option<Rc<RefCell<Filesystem>>>, + process: std::rc::Rc<std::cell::RefCell<ProcessExecutor>>, + filesystem: Option<std::rc::Rc<std::cell::RefCell<Filesystem>>>, ) -> FossilDownloader { - let io = - io.unwrap_or_else(|| Rc::new(RefCell::new(IOStub::new())) as Rc<RefCell<dyn IOInterface>>); + let io = io.unwrap_or_else(|| { + std::rc::Rc::new(std::cell::RefCell::new(IOStub::new())) + as std::rc::Rc<std::cell::RefCell<dyn IOInterface>> + }); // 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 { |
