Skip to content

Commit 14cee64

Browse files
authored
fix(fs): fix compilation on targets with pointer width 16 and 32 (#1958)
1 parent 3fd2831 commit 14cee64

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changes/change-pr-1958.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fs": patch
3+
---
4+
5+
Fix compilation on targets with pointer width of `16` or `32`

plugins/fs/src/commands.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,14 @@ pub async fn read<R: Runtime>(
316316
let nread = nread.to_be_bytes();
317317
let mut out = [0; 8];
318318
out[6..].copy_from_slice(&nread);
319+
out
319320
};
320321
#[cfg(target_pointer_width = "32")]
321322
let nread = {
322323
let nread = nread.to_be_bytes();
323324
let mut out = [0; 8];
324325
out[4..].copy_from_slice(&nread);
326+
out
325327
};
326328
#[cfg(target_pointer_width = "64")]
327329
let nread = nread.to_be_bytes();

0 commit comments

Comments
 (0)