[librsvg: 35/43] css: use is_empty



commit db2880708fcf7923f5abe9d93d6b5f6d964f5b06
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Oct 13 12:49:04 2019 +0200

    css: use is_empty

 rsvg_internals/src/css.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index 7869664a..df0d67aa 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -122,7 +122,7 @@ impl<'a> Iterator for DeclarationListIter<'a> {
 
 impl CssRules {
     pub fn parse(&mut self, base_url: Option<&Url>, buf: &str) {
-        if buf.len() == 0 {
+        if buf.is_empty() {
             return; // libcroco doesn't like empty strings :(
         }
 


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