We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9a25fa commit a74e95aCopy full SHA for a74e95a
src/ascii_str.rs
@@ -417,8 +417,8 @@ mod tests {
417
fn generic<C:IntoAsciiStr+?Sized>(c: &C) -> Result<&AsciiStr,IntoAsciiStrError> {
418
c.into_ascii()
419
}
420
- assert_eq!(generic("A"), Ok([Ascii::A].as_ref().into()));
421
- assert_eq!(generic(&b"A"[..]), Ok([Ascii::A].as_ref().into()));
+ assert_eq!(generic("A").map(AsciiStr::as_slice), Ok(&[Ascii::A][..]));
+ assert_eq!(generic(&b"A"[..]).map(AsciiStr::as_slice), Ok(&[Ascii::A][..]));
422
423
424
#[test]
0 commit comments