aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/base_config_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/base_config_command.rs')
-rw-r--r--crates/shirabe/src/command/base_config_command.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/base_config_command.rs b/crates/shirabe/src/command/base_config_command.rs
index c63f63c..9a599f6 100644
--- a/crates/shirabe/src/command/base_config_command.rs
+++ b/crates/shirabe/src/command/base_config_command.rs
@@ -36,9 +36,10 @@ pub trait BaseConfigCommand: BaseCommand {
return Err(anyhow::anyhow!("--file and --global can not be combined"));
}
- let io = self.get_io();
+ // TODO(phase-b): clone_box to release the &mut self borrow held by get_io.
+ let io = self.get_io().clone_box();
*self.config_mut() = Some(std::rc::Rc::new(std::cell::RefCell::new(
- Factory::create_config(Some(&*io), None)?,
+ Factory::create_config(Some(io.as_ref()), None)?,
)));
let config_rc = std::rc::Rc::clone(self.config().unwrap());