From 3f2b09692b2dbe49a189ae8d62ed61980a450070 Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Sun, 25 Sep 2022 14:13:10 +0200 Subject: [PATCH] Fix some clippy lints --- narcissus-core/src/image.rs | 4 ++-- narcissus-core/src/obj.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/narcissus-core/src/image.rs b/narcissus-core/src/image.rs index cd16d36..5e692a0 100644 --- a/narcissus-core/src/image.rs +++ b/narcissus-core/src/image.rs @@ -75,8 +75,8 @@ impl Image { self.components } - /// The pixel data consists of [`height()`] scanlines of [`width()`] pixels, - /// with each pixel consisting of [`components()`] interleaved 8-bit components; the first + /// The pixel data consists of [`Self::height()`] scanlines of [`Self::width()`] pixels, + /// with each pixel consisting of [`Self::components()`] interleaved 8-bit components; the first /// pixel pointed to is top-left-most in the image. There is no padding between /// image scanlines or between pixels, regardless of format. /// diff --git a/narcissus-core/src/obj.rs b/narcissus-core/src/obj.rs index 7077f32..64f0b38 100644 --- a/narcissus-core/src/obj.rs +++ b/narcissus-core/src/obj.rs @@ -73,7 +73,7 @@ where pub fn visit(&mut self, visitor: &mut V) -> Result<(), Error> { fn parse_line(line: &[u8], visitor: &mut V) -> Result<(), Error> { - debug_assert!(line.len() > 0); + debug_assert!(!line.is_empty()); let mut i = 0; -- 2.49.0