diff --git a/lib/crates/fabro-interview/src/recording.rs b/lib/crates/fabro-interview/src/recording.rs index 1f69bcaa0..6a376a3b9 100644 --- a/lib/crates/fabro-interview/src/recording.rs +++ b/lib/crates/fabro-interview/src/recording.rs @@ -36,8 +36,7 @@ impl RecordingInterviewer { /// Returns an error if serialization fails. pub fn to_json(&self) -> std::io::Result { let recordings = self.recordings(); - serde_json::to_string_pretty(&recordings) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e)) + serde_json::to_string_pretty(&recordings).map_err(std::io::Error::other) } /// Deserializes recordings from a JSON string. @@ -45,8 +44,7 @@ impl RecordingInterviewer { /// # Errors /// Returns an error if deserialization fails. pub fn from_json(json: &str) -> std::io::Result> { - serde_json::from_str(json) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e)) + serde_json::from_str(json).map_err(std::io::Error::other) } /// Saves recordings to a file as JSON. diff --git a/lib/crates/fabro-workflows/src/cli/run.rs b/lib/crates/fabro-workflows/src/cli/run.rs index 8c06feea3..ee7ba4229 100644 --- a/lib/crates/fabro-workflows/src/cli/run.rs +++ b/lib/crates/fabro-workflows/src/cli/run.rs @@ -1706,10 +1706,10 @@ async fn run_from_branch( }; // Build interviewer - let interviewer: Arc = if args.auto_approve { - Arc::new(fabro_interview::AutoApproveInterviewer) + let interviewer: Arc = if args.auto_approve { + Arc::new(AutoApproveInterviewer) } else { - Arc::new(fabro_interview::ConsoleInterviewer::new(styles)) + Arc::new(ConsoleInterviewer::new(styles)) }; // Build engine with a backend