You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-cargo-util-schemas/port-to-snapbox-0.6.patch

52 lines
1.6 KiB

diff --git a/src/core/partial_version.rs b/src/core/partial_version.rs
index 5057d6046e1..00252f56aa0 100644
--- a/src/core/partial_version.rs
+++ b/src/core/partial_version.rs
@@ -186,6 +186,7 @@ enum ErrorKind {
#[cfg(test)]
mod test {
use super::*;
+ use snapbox::prelude::*;
use snapbox::str;
#[test]
@@ -202,7 +203,7 @@ mod test {
Ok(result) => result.to_string(),
Err(err) => format!("didn't pass: {err}"),
};
- snapbox::assert_eq(expected.clone(), actual);
+ snapbox::assert_data_eq!(actual, expected.clone().raw());
}
}
@@ -241,7 +242,7 @@ mod test {
Ok(result) => format!("didn't fail: {result:?}"),
Err(err) => err.to_string(),
};
- snapbox::assert_eq(expected.clone(), actual);
+ snapbox::assert_data_eq!(actual, expected.clone().raw());
}
}
}
diff --git a/src/manifest/rust_version.rs b/src/manifest/rust_version.rs
index 5c40097737f..7afcf92bd80 100644
--- a/src/manifest/rust_version.rs
+++ b/src/manifest/rust_version.rs
@@ -106,6 +106,7 @@ enum RustVersionErrorKind {
#[cfg(test)]
mod test {
use super::*;
+ use snapbox::prelude::*;
use snapbox::str;
#[test]
@@ -212,7 +213,7 @@ mod test {
Ok(result) => format!("didn't fail: {result:?}"),
Err(err) => err.to_string(),
};
- snapbox::assert_eq(expected.clone(), actual);
+ snapbox::assert_data_eq!(actual, expected.clone().raw());
}
}
}