From 823f6a60812f8fbd30d7c0d429d4c6d3d669ec0f Mon Sep 17 00:00:00 2001 From: bWanShiTong <157274881+bWanShiTong@users.noreply.github.com> Date: Sun, 20 Oct 2024 16:00:45 +0200 Subject: [PATCH] Update commands.rs Fixed compilation for systems where `target_pointer_width` is 16 or 32 --- plugins/fs/src/commands.rs | 2 ++ 1 file changed, 2 insertions(+) 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();