From 3794751e44071a0e242cfb4c0984bcdc5e3e5231 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Thu, 28 Sep 2023 23:18:55 -0400 Subject: [PATCH] style nits Co-authored-by: David Tolnay --- library/alloc/src/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 7079fc6218e1..058eb6d69635 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -751,7 +751,7 @@ impl String { return Err(FromUtf16Error(())); } match (cfg!(target_endian = "little"), unsafe { v.align_to::() }) { - (true, (&[], v, &[])) => Self::from_utf16(v), + (true, ([], v, [])) => Self::from_utf16(v), _ => decode_utf16(v.array_chunks::<2>().copied().map(u16::from_le_bytes)) .collect::>() .map_err(|_| FromUtf16Error(())),