mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Remove redundant type annotation
This commit is contained in:
parent
9a9d5534f0
commit
6cfdeaf1a1
@ -160,7 +160,7 @@ pub fn to_u16s<S: AsRef<OsStr>>(s: S) -> crate::io::Result<Vec<u16>> {
|
|||||||
// in the OsStr plus one for the null-terminating character. We are not
|
// in the OsStr plus one for the null-terminating character. We are not
|
||||||
// wasting bytes here as paths created by this function are primarily used
|
// wasting bytes here as paths created by this function are primarily used
|
||||||
// in an ephemeral fashion.
|
// in an ephemeral fashion.
|
||||||
let mut maybe_result: Vec<u16> = Vec::with_capacity(s.len() + 1);
|
let mut maybe_result = Vec::with_capacity(s.len() + 1);
|
||||||
maybe_result.extend(s.encode_wide());
|
maybe_result.extend(s.encode_wide());
|
||||||
|
|
||||||
if unrolled_find_u16s(0, &maybe_result).is_some() {
|
if unrolled_find_u16s(0, &maybe_result).is_some() {
|
||||||
|
Loading…
Reference in New Issue
Block a user