Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir authored Oct 22, 2024
1 parent 0259c06 commit 0813d2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/fs/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ fn write_file_inner<R: Runtime>(
},
)?;

file.write_all(&data)
file.write_all(data)
.map_err(|e| {
format!(
"failed to write bytes to file at path: {} with error: {e}",
Expand Down Expand Up @@ -1199,6 +1199,7 @@ fn path_from_bytes(bytes: &[u8]) -> PathBuf {
}

// https://github.com/microsoft/windows-rs/blob/98ca5853f2f3eab2a39d6152f5eb278e756a45e1/crates/libs/strings/src/literals.rs#L144
#[cfg(windows)]
const fn decode_utf8_char(bytes: &[u8], mut pos: usize) -> Option<(u32, usize)> {
if bytes.len() == pos {
return None;
Expand Down Expand Up @@ -1264,6 +1265,7 @@ const fn decode_utf8_char(bytes: &[u8], mut pos: usize) -> Option<(u32, usize)>
}

// https://github.com/microsoft/windows-rs/blob/98ca5853f2f3eab2a39d6152f5eb278e756a45e1/crates/libs/strings/src/literals.rs#L144
#[cfg(windows)]
const fn utf16_len(bytes: &[u8]) -> usize {
let mut pos = 0;
let mut len = 0;
Expand Down

0 comments on commit 0813d2a

Please sign in to comment.