Skip to content

Commit a74e95a

Browse files
committed
Fix test that didn't compile.
If tomprogrammer#18 (str_into_from) is merged before this pull request, this commit can be omitted.
1 parent a9a25fa commit a74e95a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ascii_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ mod tests {
417417
fn generic<C:IntoAsciiStr+?Sized>(c: &C) -> Result<&AsciiStr,IntoAsciiStrError> {
418418
c.into_ascii()
419419
}
420-
assert_eq!(generic("A"), Ok([Ascii::A].as_ref().into()));
421-
assert_eq!(generic(&b"A"[..]), Ok([Ascii::A].as_ref().into()));
420+
assert_eq!(generic("A").map(AsciiStr::as_slice), Ok(&[Ascii::A][..]));
421+
assert_eq!(generic(&b"A"[..]).map(AsciiStr::as_slice), Ok(&[Ascii::A][..]));
422422
}
423423

424424
#[test]

0 commit comments

Comments
 (0)