mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
fix(fs): fix compilation on targets with pointer width 16 and 32 (#1958)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"fs": patch
|
||||
---
|
||||
|
||||
Fix compilation on targets with pointer width of `16` or `32`
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user