From: Joshua Simmons Date: Sun, 25 Sep 2022 12:13:10 +0000 (+0200) Subject: Fix some clippy lints X-Git-Url: https://git.nega.tv//gitweb.cgi?a=commitdiff_plain;h=3f2b09692b2dbe49a189ae8d62ed61980a450070;p=josh%2Fnarcissus Fix some clippy lints --- 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;