aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/common/io_mock.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-11 16:33:05 +0900
committernsfisis <nsfisis@gmail.com>2026-07-11 16:33:05 +0900
commit27d00055df8691a6bd99aaf38633a7338b16cc6a (patch)
tree4af17ccff5f8c2d09156fa62c559e60e3e683dac /crates/shirabe/tests/common/io_mock.rs
parent1ec2220def43e37e5a65b96dde93c19b493258f4 (diff)
downloadphp-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/common/io_mock.rs')
-rw-r--r--crates/shirabe/tests/common/io_mock.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/shirabe/tests/common/io_mock.rs b/crates/shirabe/tests/common/io_mock.rs
index 7b932a87..e54c45b9 100644
--- a/crates/shirabe/tests/common/io_mock.rs
+++ b/crates/shirabe/tests/common/io_mock.rs
@@ -8,9 +8,7 @@ use shirabe::util::platform::Platform;
use shirabe_external_packages::composer::pcre::Preg;
use shirabe_external_packages::symfony::console::output::output_interface;
use shirabe_php_shim::{PHP_EOL, PhpMixed, preg_quote};
-use std::cell::RefCell;
use std::collections::VecDeque;
-use std::rc::Rc;
// A single entry of the IO expectation list. PHP models these as associative
// arrays (`{text, regex?}` / `{ask, reply}` / `{auth: [repo, user, pass]}`); the
@@ -344,7 +342,7 @@ fn trim_eol(question: &str) -> &str {
question.trim_end_matches(['\r', '\n'])
}
-pub struct IOMockGuard(Rc<RefCell<IOMock>>);
+pub struct IOMockGuard(std::rc::Rc<std::cell::RefCell<IOMock>>);
impl Drop for IOMockGuard {
fn drop(&mut self) {
@@ -358,7 +356,9 @@ impl Drop for IOMockGuard {
// For testing only. Mirrors TestCase::getIOMock: returns a shared IOMock handle
// plus a guard that runs assert_complete when it drops at the end of the test scope.
-pub fn get_io_mock(verbosity: i64) -> anyhow::Result<(Rc<RefCell<IOMock>>, IOMockGuard)> {
- let mock = Rc::new(RefCell::new(IOMock::new(verbosity)?));
+pub fn get_io_mock(
+ verbosity: i64,
+) -> anyhow::Result<(std::rc::Rc<std::cell::RefCell<IOMock>>, IOMockGuard)> {
+ let mock = std::rc::Rc::new(std::cell::RefCell::new(IOMock::new(verbosity)?));
Ok((mock.clone(), IOMockGuard(mock)))
}