diff --git a/crates/snapbox/src/cmd.rs b/crates/snapbox/src/cmd.rs index 2331ca15..f13471a2 100644 --- a/crates/snapbox/src/cmd.rs +++ b/crates/snapbox/src/cmd.rs @@ -702,7 +702,7 @@ impl OutputAssert { #[track_caller] fn stdout_eq_inner(self, expected: crate::Data) -> Self { - let actual = crate::Data::from(self.output.stdout.as_slice()); + let actual = self.output.stdout.as_slice().into_data(); if let Err(err) = self.config.try_eq(Some(&"stdout"), actual, expected) { err.panic(); } @@ -824,7 +824,7 @@ impl OutputAssert { #[track_caller] fn stderr_eq_inner(self, expected: crate::Data) -> Self { - let actual = crate::Data::from(self.output.stderr.as_slice()); + let actual = self.output.stderr.as_slice().into_data(); if let Err(err) = self.config.try_eq(Some(&"stderr"), actual, expected) { err.panic(); } diff --git a/crates/trycmd/src/runner.rs b/crates/trycmd/src/runner.rs index 0d405fd4..96159164 100644 --- a/crates/trycmd/src/runner.rs +++ b/crates/trycmd/src/runner.rs @@ -15,6 +15,7 @@ use rayon::prelude::*; use snapbox::data::DataFormat; use snapbox::dir::FileType; use snapbox::filter::{Filter as _, FilterNewlines, FilterPaths, FilterRedactions}; +use snapbox::IntoData; #[derive(Debug)] pub(crate) struct Runner { @@ -584,12 +585,12 @@ impl Output { self.spawn.status = SpawnStatus::Ok; self.stdout = Some(Stream { stream: Stdio::Stdout, - content: output.stdout.into(), + content: output.stdout.into_data(), status: StreamStatus::Ok, }); self.stderr = Some(Stream { stream: Stdio::Stderr, - content: output.stderr.into(), + content: output.stderr.into_data(), status: StreamStatus::Ok, }); self