Skip to content

Commit 9d08fbf

Browse files
committed
fix(server-rust): drop unnecessary u32 cast on splice flags (Linux clippy)
`clippy -D warnings` failed on Linux at src/engine_raw.rs:630 and :666: `(SPLICE_F_MOVE | SPLICE_F_MORE) as u32` is an unnecessary cast — the flags are already `c_uint` (u32) and `libc::splice`'s flags param is `c_uint`. macOS doesn't compile this Linux-only splice path, so local clippy didn't catch it. Verified the Linux compile still builds (Docker).
1 parent 2d648fc commit 9d08fbf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/server-rust/src/engine_raw.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ pub(crate) mod zerocopy {
627627
pw,
628628
std::ptr::null_mut(),
629629
len,
630-
(libc::SPLICE_F_MOVE | libc::SPLICE_F_MORE) as u32,
630+
libc::SPLICE_F_MOVE | libc::SPLICE_F_MORE,
631631
)
632632
};
633633
if n < 0 {
@@ -663,7 +663,7 @@ pub(crate) mod zerocopy {
663663
file_fd,
664664
file_off as *mut i64,
665665
moved - drained,
666-
(libc::SPLICE_F_MOVE | libc::SPLICE_F_MORE) as u32,
666+
libc::SPLICE_F_MOVE | libc::SPLICE_F_MORE,
667667
)
668668
};
669669
if m < 0 {

0 commit comments

Comments
 (0)