Skip to content

Commit 0412329

Browse files
pre-commit-ci-lite[bot]snkas
authored andcommitted
[pre-commit.ci lite] apply automatic fixes
1 parent f061d1b commit 0412329

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

crates/feldera-types/src/program_schema.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -714,16 +714,19 @@ mod tests {
714714
&sql_str_base.to_lowercase(), // lowercase
715715
&sql_str_base.to_uppercase(), // UPPERCASE
716716
] {
717-
let value1: SqlType = serde_json::from_str(&format!("\"{}\"", sql_str)).expect(
718-
&format!("\"{sql_str}\" should deserialize into its SQL type"),
719-
);
717+
let value1: SqlType = serde_json::from_str(&format!("\"{}\"", sql_str))
718+
.unwrap_or_else(|_| {
719+
panic!("\"{sql_str}\" should deserialize into its SQL type")
720+
});
720721
assert_eq!(value1, expected_value);
721722
let serialized_str =
722723
serde_json::to_string(&value1).expect("Value should serialize into JSON");
723-
let value2: SqlType = serde_json::from_str(&serialized_str).expect(&format!(
724-
"{} should deserialize back into its SQL type",
725-
serialized_str
726-
));
724+
let value2: SqlType = serde_json::from_str(&serialized_str).unwrap_or_else(|_| {
725+
panic!(
726+
"{} should deserialize back into its SQL type",
727+
serialized_str
728+
)
729+
});
727730
assert_eq!(value1, value2);
728731
}
729732
}

0 commit comments

Comments
 (0)