Sfoglia il codice sorgente

Fix clippy warnings

Dirkjan Ochtman 5 anni fa
parent
commit
06b790ac98
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      url/src/lib.rs
  2. 1 1
      url/tests/data.rs

+ 1 - 1
url/src/lib.rs

@@ -2083,7 +2083,7 @@ impl Url {
     /// # }
     /// # }
     /// # run().unwrap();
     /// # run().unwrap();
     /// ```
     /// ```
-    #[allow(clippy::clippy::result_unit_err)]
+    #[allow(clippy::result_unit_err, clippy::suspicious_operation_groupings)]
     pub fn set_scheme(&mut self, scheme: &str) -> Result<(), ()> {
     pub fn set_scheme(&mut self, scheme: &str) -> Result<(), ()> {
         let mut parser = Parser::for_setter(String::new());
         let mut parser = Parser::for_setter(String::new());
         let remaining = parser.parse_scheme(parser::Input::new(scheme))?;
         let remaining = parser.parse_scheme(parser::Input::new(scheme))?;

+ 1 - 1
url/tests/data.rs

@@ -223,7 +223,7 @@ fn eprint_failure(err: String, name: &str, comment: Option<&str>) {
     if let Some(comment) = comment {
     if let Some(comment) = comment {
         eprintln!("{}\n", comment);
         eprintln!("{}\n", comment);
     } else {
     } else {
-        eprintln!("");
+        eprintln!();
     }
     }
 }
 }