Răsfoiți Sursa

Silence clippy warnings

Matt Brubeck 5 ani în urmă
părinte
comite
540ede02d0
4 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 1 0
      data-url/src/mime.rs
  2. 1 1
      idna/src/punycode.rs
  3. 1 0
      idna/src/uts46.rs
  4. 1 0
      url/src/lib.rs

+ 1 - 0
data-url/src/mime.rs

@@ -62,6 +62,7 @@ fn split2(s: &str, separator: char) -> (&str, Option<&str>) {
     (first, iter.next())
 }
 
+#[allow(clippy::manual_strip)] // introduced in 1.45, MSRV is 1.36
 fn parse_parameters(s: &str, parameters: &mut Vec<(String, String)>) {
     let mut semicolon_separated = s.split(';');
 

+ 1 - 1
idna/src/punycode.rs

@@ -164,7 +164,7 @@ where
     }
 
     if basic_length > 0 {
-        output.push_str("-")
+        output.push('-')
     }
     let mut code_point = INITIAL_N;
     let mut delta = 0;

+ 1 - 0
idna/src/uts46.rs

@@ -298,6 +298,7 @@ fn is_valid(label: &str, config: Config) -> bool {
 }
 
 /// http://www.unicode.org/reports/tr46/#Processing
+#[allow(clippy::manual_strip)] // introduced in 1.45, MSRV is 1.36
 fn processing(domain: &str, config: Config) -> (String, Errors) {
     // Weed out the simple cases: only allow all lowercase ASCII characters and digits where none
     // of the labels start with PUNYCODE_PREFIX and labels don't start or end with hyphen.

+ 1 - 0
url/src/lib.rs

@@ -1092,6 +1092,7 @@ impl Url {
     /// # }
     /// # run().unwrap();
     /// ```
+    #[allow(clippy::manual_strip)] // introduced in 1.45, MSRV is 1.36
     pub fn path_segments(&self) -> Option<str::Split<'_, char>> {
         let path = self.path();
         if path.starts_with('/') {