]> git.nega.tv - josh/narcissus/commitdiff
Fix some clippy lints
authorJoshua Simmons <josh@nega.tv>
Sun, 25 Sep 2022 12:13:10 +0000 (14:13 +0200)
committerJoshua Simmons <josh@nega.tv>
Sun, 25 Sep 2022 12:13:10 +0000 (14:13 +0200)
narcissus-core/src/image.rs
narcissus-core/src/obj.rs

index cd16d36173d247b27f9b136f2b773ccffe6ae3d5..5e692a05ca3f1891c86d4984fc1aa042b12cc58a 100644 (file)
@@ -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.
     ///
index 7077f3233378e2eae9e0a8d1c2a4136c3796834f..64f0b38f00ccf540c42227da02620a6769b4ea7a 100644 (file)
@@ -73,7 +73,7 @@ where
 
     pub fn visit<V: Visitor>(&mut self, visitor: &mut V) -> Result<(), Error> {
         fn parse_line<V: Visitor>(line: &[u8], visitor: &mut V) -> Result<(), Error> {
-            debug_assert!(line.len() > 0);
+            debug_assert!(!line.is_empty());
 
             let mut i = 0;