Procházet zdrojové kódy

Silence clippy warnings

Matt Brubeck před 5 roky
rodič
revize
540ede02d0
4 změnil soubory, kde provedl 4 přidání a 1 odebrání
  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())
     (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)>) {
 fn parse_parameters(s: &str, parameters: &mut Vec<(String, String)>) {
     let mut semicolon_separated = s.split(';');
     let mut semicolon_separated = s.split(';');
 
 

+ 1 - 1
idna/src/punycode.rs

@@ -164,7 +164,7 @@ where
     }
     }
 
 
     if basic_length > 0 {
     if basic_length > 0 {
-        output.push_str("-")
+        output.push('-')
     }
     }
     let mut code_point = INITIAL_N;
     let mut code_point = INITIAL_N;
     let mut delta = 0;
     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
 /// 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) {
 fn processing(domain: &str, config: Config) -> (String, Errors) {
     // Weed out the simple cases: only allow all lowercase ASCII characters and digits where none
     // 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.
     // 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();
     /// # run().unwrap();
     /// ```
     /// ```
+    #[allow(clippy::manual_strip)] // introduced in 1.45, MSRV is 1.36
     pub fn path_segments(&self) -> Option<str::Split<'_, char>> {
     pub fn path_segments(&self) -> Option<str::Split<'_, char>> {
         let path = self.path();
         let path = self.path();
         if path.starts_with('/') {
         if path.starts_with('/') {