From 8a10b4a9debfbddc9f8121036e66ee11d4d62a02 Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Sun, 12 May 2024 19:50:46 -0400 Subject: [PATCH] address some clippy warning about numeric maxima --- capnp/src/message.rs | 2 +- capnp/src/private/arena.rs | 1 - capnp/src/private/layout.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/capnp/src/message.rs b/capnp/src/message.rs index 9cbb1d44b..0133492a5 100644 --- a/capnp/src/message.rs +++ b/capnp/src/message.rs @@ -505,7 +505,7 @@ where self, ReaderOptions { traversal_limit_in_words: None, - nesting_limit: i32::max_value(), + nesting_limit: i32::MAX, }, ) } diff --git a/capnp/src/private/arena.rs b/capnp/src/private/arena.rs index 89875e34d..e7c246e42 100644 --- a/capnp/src/private/arena.rs +++ b/capnp/src/private/arena.rs @@ -19,7 +19,6 @@ // THE SOFTWARE. use core::slice; -use core::u64; use crate::message; use crate::message::Allocator; diff --git a/capnp/src/private/layout.rs b/capnp/src/private/layout.rs index ff26c6d87..ded5bf901 100644 --- a/capnp/src/private/layout.rs +++ b/capnp/src/private/layout.rs @@ -3194,7 +3194,7 @@ impl<'a> PointerBuilder<'a> { self.segment_id, self.cap_table.into_reader(), self.pointer, - ::core::i32::MAX, + i32::MAX, ) } }