diff --git a/src/completion_queue.rs b/src/completion_queue.rs index 867fb1a..2d60734 100644 --- a/src/completion_queue.rs +++ b/src/completion_queue.rs @@ -104,7 +104,7 @@ impl<'ring> CompletionQueue<'ring> { } impl fmt::Debug for CompletionQueue<'_> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let fd = unsafe { self.ring.as_ref().ring_fd }; f.debug_struct(std::any::type_name::()).field("fd", &fd).finish() } diff --git a/src/lib.rs b/src/lib.rs index c9638d5..5b92a66 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,7 +33,7 @@ //! after that specified time. This also means that when processing completion events, you need to //! be prepared for the possibility that the completion represents a timeout and not a normal IO //! event (`CQE` has a method to check for this). - +#![warn(rust_2018_idioms)] /// Types related to completion queue events. pub mod cqe; /// Types related to submission queue events. @@ -360,7 +360,7 @@ impl IoUring { } impl fmt::Debug for IoUring { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct(std::any::type_name::()).field("fd", &self.ring.ring_fd).finish() } } diff --git a/src/registrar/mod.rs b/src/registrar/mod.rs index 1c31fbb..6ea1858 100644 --- a/src/registrar/mod.rs +++ b/src/registrar/mod.rs @@ -250,7 +250,7 @@ impl<'ring> Registrar<'ring> { } impl fmt::Debug for Registrar<'_> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let fd = unsafe { self.ring.as_ref().ring_fd }; f.debug_struct(std::any::type_name::()).field("fd", &fd).finish() } diff --git a/src/submission_queue.rs b/src/submission_queue.rs index 7a72a72..7888600 100644 --- a/src/submission_queue.rs +++ b/src/submission_queue.rs @@ -132,7 +132,7 @@ impl<'ring> SubmissionQueue<'ring> { } impl fmt::Debug for SubmissionQueue<'_> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let fd = unsafe { self.ring.as_ref().ring_fd }; f.debug_struct(std::any::type_name::()).field("fd", &fd).finish() }