convert some unwraps to expects

This commit is contained in:
Edward Shen 2021-07-22 13:46:40 -04:00
parent 07bd39e69d
commit 42cbd81375
Signed by: edward
GPG key ID: F350507060ED6C90

View file

@ -130,8 +130,8 @@ pub async fn metrics() -> impl Responder {
let mut buffer = Vec::new();
TextEncoder::new()
.encode(&metric_families, &mut buffer)
.unwrap();
String::from_utf8(buffer).unwrap()
.expect("Should never have an io error writing to a vec");
String::from_utf8(buffer).expect("Text encoder should render valid utf-8")
}
#[derive(Error, Debug, PartialEq, Eq)]