diff --git a/communication/src/allocator/zero_copy/allocator.rs b/communication/src/allocator/zero_copy/allocator.rs index 8f35279f0..35cac7f4a 100644 --- a/communication/src/allocator/zero_copy/allocator.rs +++ b/communication/src/allocator/zero_copy/allocator.rs @@ -261,7 +261,7 @@ impl Allocate for TcpAllocator { // We expect that `bytes` contains an integral number of messages. // No splitting occurs across allocations. - while bytes.len() > 0 { + while !bytes.is_empty() { if let Some(header) = MessageHeader::try_read(&bytes[..]) { diff --git a/communication/src/allocator/zero_copy/allocator_process.rs b/communication/src/allocator/zero_copy/allocator_process.rs index f948e257b..8aee89b23 100644 --- a/communication/src/allocator/zero_copy/allocator_process.rs +++ b/communication/src/allocator/zero_copy/allocator_process.rs @@ -188,7 +188,7 @@ impl Allocate for ProcessAllocator { // We expect that `bytes` contains an integral number of messages. // No splitting occurs across allocations. - while bytes.len() > 0 { + while !bytes.is_empty() { if let Some(header) = MessageHeader::try_read(&bytes[..]) { diff --git a/timely/src/dataflow/stream.rs b/timely/src/dataflow/stream.rs index 272ff3c6a..b4f634f4d 100644 --- a/timely/src/dataflow/stream.rs +++ b/timely/src/dataflow/stream.rs @@ -95,7 +95,6 @@ where fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Stream") .field("source", &self.name) - // TODO: Use `.finish_non_exhaustive()` after rust/#67364 lands - .finish() + .finish_non_exhaustive() } }