diff --git a/plugins/fs/src/commands.rs b/plugins/fs/src/commands.rs index dcc8b6544..d25dd9eae 100644 --- a/plugins/fs/src/commands.rs +++ b/plugins/fs/src/commands.rs @@ -1830,7 +1830,7 @@ fn read_until_bytes( /// Whether `buf` ends with `bytes`, starting on a multiple of `bytes.len()`. fn ends_with_aligned(buf: &[u8], bytes: &[u8]) -> bool { - buf.ends_with(bytes) && buf.len() % bytes.len() == 0 + buf.ends_with(bytes) && buf.len().is_multiple_of(bytes.len()) } struct StdLinesResource(Mutex>>);