We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8110a04 commit aa908b2Copy full SHA for aa908b2
src/lib.rs
@@ -52,8 +52,11 @@ impl ObjectKey {
52
let val = serde_json::Value::String(s);
53
let mut s = Serializer::new(w);
54
val.serialize(&mut s).map_err(|e| {
55
- let kind = e.io_error_kind().unwrap();
56
- Error::new(kind, "I/O error")
+ if let Some(kind) = e.io_error_kind() {
+ Error::new(kind, "I/O error")
57
+ } else {
58
+ Error::new(ErrorKind::Other, e.to_string())
59
+ }
60
})
61
}
62
0 commit comments