Skip to content

Commit bb7d54b

Browse files
committed
avoid extra unwrap even though it's unlikely to panic.
1 parent 693df72 commit bb7d54b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

google-apis-common/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ impl Read for MultiPartReader<'_> {
422422
encoded_headers.push_str(LINE_ENDING);
423423
}
424424

425-
write!(encoded_headers, "{}: {}", k, v.to_str().unwrap()).unwrap();
425+
write!(encoded_headers, "{}: {}", k, v.to_str().unwrap())
426+
.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?;
426427
}
427428

428429
let mut c = Cursor::new(Vec::<u8>::new());

0 commit comments

Comments
 (0)