convert some unwraps to expects
This commit is contained in:
parent
07bd39e69d
commit
42cbd81375
1 changed files with 2 additions and 2 deletions
|
@ -130,8 +130,8 @@ pub async fn metrics() -> impl Responder {
|
||||||
let mut buffer = Vec::new();
|
let mut buffer = Vec::new();
|
||||||
TextEncoder::new()
|
TextEncoder::new()
|
||||||
.encode(&metric_families, &mut buffer)
|
.encode(&metric_families, &mut buffer)
|
||||||
.unwrap();
|
.expect("Should never have an io error writing to a vec");
|
||||||
String::from_utf8(buffer).unwrap()
|
String::from_utf8(buffer).expect("Text encoder should render valid utf-8")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Error, Debug, PartialEq, Eq)]
|
#[derive(Error, Debug, PartialEq, Eq)]
|
||||||
|
|
Loading…
Reference in a new issue