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, ) } }