[librsvg] cond.rs: Use AsciiExt to maintain backwards compatibility.



commit 0235938ca01d77550d4a225541eecdbe7aa1bd72
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Wed Mar 21 07:39:18 2018 +0200

    cond.rs: Use AsciiExt to maintain backwards compatibility.
    
    In rustc 1.23 the "eq_ignore_ascii_case" method of the AsciiExt
    was implemented directly for the types u8, chat, [u8] and str.
    This causes the code to built fine with 1.23+ version of rustc
    but failling for the v1.21 and v1.22 as the method does not exitst.
    
    This patch imports the AsciiExt Trait and ignores the compiler
    warning that would be produced when compiling with 1.23+ version
    about an unused import.

 rsvg_internals/src/cond.rs | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/rsvg_internals/src/cond.rs b/rsvg_internals/src/cond.rs
index f9c4d315..6b79c2d9 100644
--- a/rsvg_internals/src/cond.rs
+++ b/rsvg_internals/src/cond.rs
@@ -7,6 +7,9 @@ use parsers::Parse;
 use std::marker::PhantomData;
 use util::utf8_cstr;
 
+#[allow(unused_imports)]
+use std::ascii::AsciiExt;
+
 use self::glib::translate::*;
 
 // No extensions at the moment.


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