[librsvg: 41/43] allowed_url: use is_empty
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 41/43] allowed_url: use is_empty
- Date: Tue, 15 Oct 2019 00:08:55 +0000 (UTC)
commit 39632bec0ca067b529b55bddac6466ac2d059e61
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Oct 13 12:53:51 2019 +0200
allowed_url: use is_empty
rsvg_internals/src/allowed_url.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/allowed_url.rs b/rsvg_internals/src/allowed_url.rs
index 2ae4b490..16a3a330 100644
--- a/rsvg_internals/src/allowed_url.rs
+++ b/rsvg_internals/src/allowed_url.rs
@@ -224,11 +224,11 @@ impl Href {
};
match (uri, fragment) {
- (None, Some(f)) if f.len() == 0 => Err(HrefError::ParseError),
+ (None, Some(f)) if f.is_empty() => Err(HrefError::ParseError),
(None, Some(f)) => Ok(Href::WithFragment(Fragment(None, f.to_string()))),
- (Some(u), _) if u.len() == 0 => Err(HrefError::ParseError),
+ (Some(u), _) if u.is_empty() => Err(HrefError::ParseError),
(Some(u), None) => Ok(Href::PlainUrl(u.to_string())),
- (Some(_u), Some(f)) if f.len() == 0 => Err(HrefError::ParseError),
+ (Some(_u), Some(f)) if f.is_empty() => Err(HrefError::ParseError),
(Some(u), Some(f)) => Ok(Href::WithFragment(Fragment(
Some(u.to_string()),
f.to_string(),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]