misc: Fix beta clippy errors

Fix clippy error: "error: manual implementation of `.is_multiple_of()
`" from rustc 1.90.0-beta.1 (788da80fc 2025-08-04).

Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
Songqian Li
2025-08-06 16:41:29 +08:00
committed by Bo Chen
parent 394fd230b0
commit cd2c43b489
13 changed files with 24 additions and 27 deletions

View File

@@ -265,7 +265,7 @@ impl BalloonEpollHandler {
error!("The head contains the request type is not right");
return Err(Error::UnexpectedWriteOnlyDescriptor);
}
if desc.len() as usize % data_chunk_size != 0 {
if !(desc.len() as usize).is_multiple_of(data_chunk_size) {
error!("the request size {} is not right", desc.len());
return Err(Error::InvalidRequest);
}