convert some unwraps to expects

master
Edward Shen 2021-07-22 13:46:40 -04:00
parent 07bd39e69d
commit 42cbd81375
Signed by: edward
GPG Key ID: F350507060ED6C90
1 changed files with 2 additions and 2 deletions

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)]