Skip to content

Commit d3e8ff4

Browse files
committed
use % 2 == 0 instead of is_multiple_of to check parity,
to support older Rust versions
1 parent d06b2c0 commit d3e8ff4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

yamux/src/frame/header.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,10 @@ impl StreamId {
297297
StreamId(val)
298298
}
299299

300+
// TODO: remove and use is multiple_of() on the next minor release.
301+
#[allow(clippy::manual_is_multiple_of)]
300302
pub fn is_server(self) -> bool {
301-
self.0.is_multiple_of(2)
303+
self.0 % 2 == 0
302304
}
303305

304306
pub fn is_client(self) -> bool {

0 commit comments

Comments
 (0)