[librsvg] Make NodeError::value_error() take two &str arguments, for convenience



commit 8962d89d0f08b0b32ad72b25dd6125d1819a5e0e
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Mar 23 16:01:35 2017 -0600

    Make NodeError::value_error() take two &str arguments, for convenience

 rust/src/error.rs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rust/src/error.rs b/rust/src/error.rs
index 45475be..8f8e9cf 100644
--- a/rust/src/error.rs
+++ b/rust/src/error.rs
@@ -26,10 +26,10 @@ impl NodeError {
         }
     }
 
-    pub fn value_error (attr_name: &str, description: String) -> NodeError {
+    pub fn value_error (attr_name: &str, description: &str) -> NodeError {
         NodeError {
             attr_name: attr_name.to_string (),
-            err: AttributeError::Value (description)
+            err: AttributeError::Value (description.to_string ())
         }
     }
 


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