diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-11 16:33:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-11 16:33:05 +0900 |
| commit | 27d00055df8691a6bd99aaf38633a7338b16cc6a (patch) | |
| tree | 4af17ccff5f8c2d09156fa62c559e60e3e683dac /crates/shirabe/tests/util/git_test.rs | |
| parent | 1ec2220def43e37e5a65b96dde93c19b493258f4 (diff) | |
| download | php-shirabe-27d00055df8691a6bd99aaf38633a7338b16cc6a.tar.gz php-shirabe-27d00055df8691a6bd99aaf38633a7338b16cc6a.tar.zst php-shirabe-27d00055df8691a6bd99aaf38633a7338b16cc6a.zip | |
chore: use fully-qualified name for Rc/RefCell
Diffstat (limited to 'crates/shirabe/tests/util/git_test.rs')
| -rw-r--r-- | crates/shirabe/tests/util/git_test.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crates/shirabe/tests/util/git_test.rs b/crates/shirabe/tests/util/git_test.rs index 991dc91c..907ec38a 100644 --- a/crates/shirabe/tests/util/git_test.rs +++ b/crates/shirabe/tests/util/git_test.rs @@ -12,8 +12,6 @@ use shirabe::util::git::Git; use shirabe::util::http_downloader::HttpDownloaderMockHandler; use shirabe::util::process_executor::{MockExpectation, MockHandler, ProcessExecutor}; use shirabe_php_shim::{PhpMixed, RuntimeException}; -use std::cell::RefCell; -use std::rc::Rc; // No-op ConfigSourceInterface, equivalent to PHPUnit's // `getMockBuilder(Config::class)` auto-stubbing getConfigSource/getAuthConfigSource: @@ -73,10 +71,15 @@ impl ConfigSourceInterface for NullConfigSource { // flattens each callable to a `Vec<String>` and hands it to `execute_args`, which always // builds a `PhpMixed::List`. So the single-token string command becomes a one-element list, // and the corresponding process expectation is a one-element list as well. -fn build_git(io: IOStub, config: Config, process: Rc<RefCell<ProcessExecutor>>) -> Git { - let io: Rc<RefCell<dyn IOInterface>> = Rc::new(RefCell::new(io)); - let config = Rc::new(RefCell::new(config)); - let fs = Rc::new(RefCell::new(Filesystem::new(None))); +fn build_git( + io: IOStub, + config: Config, + process: std::rc::Rc<std::cell::RefCell<ProcessExecutor>>, +) -> Git { + let io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>> = + std::rc::Rc::new(std::cell::RefCell::new(io)); + let config = std::rc::Rc::new(std::cell::RefCell::new(config)); + let fs = std::rc::Rc::new(std::cell::RefCell::new(Filesystem::new(None))); Git::new(io, config, process, fs) } |
