Skip to content

Commit d1a631f

Browse files
committed
Fix mere conflicts and finalize standardization
It compiles now!
1 parent 68767e9 commit d1a631f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/trace/server_timing/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ impl ServerTiming {
100100
pub fn value(&self) -> HeaderValue {
101101
let mut output = String::new();
102102
for (n, timing) in self.timings.iter().enumerate() {
103-
let timing: HeaderValue = timing.into();
103+
let timing: HeaderValue = timing.clone().into();
104104
match n {
105-
1 => write!(output, "{}", timing),
106-
_ => write!(output, ", {}", timing),
105+
1 => write!(output, "{}", timing).unwrap(),
106+
_ => write!(output, ", {}", timing).unwrap(),
107107
};
108108
}
109-
output.as_ref().into()
109+
unsafe { HeaderValue::from_bytes_unchecked(output.into()) }
110110
}
111111

112112
/// Push an entry into the list of entries.
@@ -251,9 +251,9 @@ mod test {
251251
}
252252

253253
#[test]
254-
fn to_header_values() {
254+
fn to_header_values() -> crate::Result<()> {
255255
let mut timings = ServerTiming::new();
256-
timings.push(Entry::new("server".to_owned(), None, None)?);
256+
timings.push(Metric::new("server".to_owned(), None, None)?);
257257

258258
let mut headers = Headers::new();
259259
timings.apply(&mut headers);

0 commit comments

Comments
 (0)