diff --git a/.changes/change-pr-1958.md b/.changes/change-pr-1958.md new file mode 100644 index 00000000..59f8fc8a --- /dev/null +++ b/.changes/change-pr-1958.md @@ -0,0 +1,5 @@ +--- +"fs": patch +--- + +Fix compilation on targets with pointer width of `16` or `32` diff --git a/plugins/fs/src/commands.rs b/plugins/fs/src/commands.rs index 58f2ce62..99eb5aa0 100644 --- a/plugins/fs/src/commands.rs +++ b/plugins/fs/src/commands.rs @@ -316,12 +316,14 @@ pub async fn read( let nread = nread.to_be_bytes(); let mut out = [0; 8]; out[6..].copy_from_slice(&nread); + out }; #[cfg(target_pointer_width = "32")] let nread = { let nread = nread.to_be_bytes(); let mut out = [0; 8]; out[4..].copy_from_slice(&nread); + out }; #[cfg(target_pointer_width = "64")] let nread = nread.to_be_bytes();