Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor(src/run.rs): handle error without panic in test
Lars Wirzenius committed 1 year ago
commit aea1347c5c653d7b375088c072e95e9a87809e80
parent bc4b4fc113cf967744eb8863332a3ca0bd3eae51
1 file changed +3 -2
modified src/run.rs
@@ -179,8 +179,9 @@ mod test {
    use super::*;

    #[test]
-
    fn serialize_run_state() {
-
        let s = serde_json::to_string(&RunState::Finished).unwrap();
+
    fn serialize_run_state() -> anyhow::Result<()> {
+
        let s = serde_json::to_string(&RunState::Finished)?;
        assert_eq!(s, r#""finished""#);
+
        Ok(())
    }
}