fix(fuzz): generated data is not always valid toml
@@ -8,8 +8,8 @@ use toml_edit::Document;
fuzz_target!(|data| {
if let Ok(data) = std::str::from_utf8(data) {
let doc = data.parse::<Document>();
- assert!(doc.is_ok());
- let doc = doc.unwrap();
+ if let Ok(doc) = doc {
assert_eq!(doc.to_string(), data);
}
+ }
});
