Skip to content

Commit 50229a2

Browse files
authored
Ignore clippy's manual_is_multiple_of warning. (#321)
unsigned_is_multiple_of() was stabilized very recently, and while the suggested code might be more idiomatic, it's not supported by our MSRV or even the stable version currently used in rules_rust, so let's ignore this clippy warning for the time being. Signed-off-by: Piotr Sikora <[email protected]>
1 parent c609755 commit 50229a2

File tree

2 files changed

+2
-0
lines changed
  • examples

2 files changed

+2
-0
lines changed

examples/grpc_auth_random/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ impl HttpContext for GrpcAuthRandom {
6868

6969
impl Context for GrpcAuthRandom {
7070
fn on_grpc_call_response(&mut self, _: u32, status_code: u32, _: usize) {
71+
#[allow(unknown_lints, clippy::manual_is_multiple_of)]
7172
if status_code % 2 == 0 {
7273
info!("Access granted.");
7374
self.resume_http_request();

examples/http_auth_random/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ impl HttpContext for HttpAuthRandom {
5050
impl Context for HttpAuthRandom {
5151
fn on_http_call_response(&mut self, _: u32, _: usize, body_size: usize, _: usize) {
5252
if let Some(body) = self.get_http_call_response_body(0, body_size) {
53+
#[allow(unknown_lints, clippy::manual_is_multiple_of)]
5354
if !body.is_empty() && body[0] % 2 == 0 {
5455
info!("Access granted.");
5556
self.resume_http_request();

0 commit comments

Comments
 (0)