[librsvg] property_bag::parse_or_none() doesn't need T to implement Default



commit 03b2fb6e379d99b0094de58ef131e64c1835950b
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Jul 20 14:05:54 2017 -0500

    property_bag::parse_or_none() doesn't need T to implement Default
    
    Only parse_or_default() does.

 rust/src/property_bag.rs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/rust/src/property_bag.rs b/rust/src/property_bag.rs
index f334388..328a493 100644
--- a/rust/src/property_bag.rs
+++ b/rust/src/property_bag.rs
@@ -67,7 +67,7 @@ pub fn length_or_value (pbag: *const RsvgPropertyBag, key: &'static str, length_
 }
 
 pub fn parse_or_none<T> (pbag: *const RsvgPropertyBag, key: &'static str) -> Result <Option<T>, NodeError>
-    where T: Default + FromStr<Err = AttributeError>
+    where T: FromStr<Err = AttributeError>
 {
     let value = lookup (pbag, key);
 


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