diff --git a/axum/src/extract/path/mod.rs b/axum/src/extract/path/mod.rs index ec8577e345..1c074c1cac 100644 --- a/axum/src/extract/path/mod.rs +++ b/axum/src/extract/path/mod.rs @@ -343,25 +343,25 @@ impl fmt::Display for ErrorKind { expected_type, } => write!( f, - "Cannot parse `{key}` with value `{value:?}` to a `{expected_type}`" + "Cannot parse `{key}` with value `{value}` to a `{expected_type}`" ), ErrorKind::ParseError { value, expected_type, - } => write!(f, "Cannot parse `{value:?}` to a `{expected_type}`"), + } => write!(f, "Cannot parse `{value}` to a `{expected_type}`"), ErrorKind::ParseErrorAtIndex { index, value, expected_type, } => write!( f, - "Cannot parse value at index {index} with value `{value:?}` to a `{expected_type}`" + "Cannot parse value at index {index} with value `{value}` to a `{expected_type}`" ), ErrorKind::DeserializeError { key, value, message, - } => write!(f, "Cannot parse `{key}` with value `{value:?}`: {message}"), + } => write!(f, "Cannot parse `{key}` with value `{value}`: {message}"), } } } @@ -919,7 +919,7 @@ mod tests { let body = res.text().await; assert_eq!( body, - r#"Invalid URL: Cannot parse `res` with value `"123123-123-123123"`: UUID parsing failed: invalid group count: expected 5, found 3"# + r#"Invalid URL: Cannot parse `res` with value `123123-123-123123`: UUID parsing failed: invalid group count: expected 5, found 3"# ); } @@ -940,7 +940,7 @@ mod tests { let body = res.text().await; assert_eq!( body, - r#"Invalid URL: Cannot parse `res` with value `"456456-123-456456"`: UUID parsing failed: invalid group count: expected 5, found 3"# + r#"Invalid URL: Cannot parse `res` with value `456456-123-456456`: UUID parsing failed: invalid group count: expected 5, found 3"# ); } }