diff --git a/.changes/change-pr-1958.md b/.changes/change-pr-1958.md new file mode 100644 index 0000000000..59f8fc8a85 --- /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 58f2ce629b..99eb5aa098 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();