[librsvg: 11/43] svg: use is_empty



commit c22aa9072402303823e3a9f361d4ad0e85ff1e78
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Oct 13 12:18:28 2019 +0200

    svg: use is_empty

 rsvg_internals/src/svg.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/svg.rs b/rsvg_internals/src/svg.rs
index daa0f918..f60ad413 100644
--- a/rsvg_internals/src/svg.rs
+++ b/rsvg_internals/src/svg.rs
@@ -183,7 +183,7 @@ fn load_image(
         content_type,
     } = io::acquire_data(&aurl, None)?;
 
-    if bytes.len() == 0 {
+    if bytes.is_empty() {
         return Err(LoadingError::EmptyData);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]