Update commands.rs

Fixed compilation for systems where `target_pointer_width`  is 16 or 32
pull/1958/head
bWanShiTong 9 months ago committed by GitHub
parent 3fd283121f
commit 823f6a6081
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -316,12 +316,14 @@ pub async fn read<R: Runtime>(
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();

Loading…
Cancel
Save