ソースを参照

Fix lint errors.

Ridwan Abdilahi 4 年 前
コミット
275baaef86
1 ファイル変更2 行追加2 行削除
  1. 2 2
      url/src/parser.rs

+ 2 - 2
url/src/parser.rs

@@ -143,7 +143,7 @@ impl fmt::Display for SyntaxViolation {
     }
     }
 }
 }
 
 
-#[derive(Copy, Clone, PartialEq)]
+#[derive(Copy, Clone, PartialEq, Eq)]
 pub enum SchemeType {
 pub enum SchemeType {
     File,
     File,
     SpecialNotFile,
     SpecialNotFile,
@@ -1561,7 +1561,7 @@ pub fn is_windows_drive_letter(segment: &str) -> bool {
 /// Whether path starts with a root slash
 /// Whether path starts with a root slash
 /// and a windows drive letter eg: "/c:" or "/a:/"
 /// and a windows drive letter eg: "/c:" or "/a:/"
 fn path_starts_with_windows_drive_letter(s: &str) -> bool {
 fn path_starts_with_windows_drive_letter(s: &str) -> bool {
-    if let Some(c) = s.as_bytes().get(0) {
+    if let Some(c) = s.as_bytes().first() {
         matches!(c, b'/' | b'\\' | b'?' | b'#') && starts_with_windows_drive_letter(&s[1..])
         matches!(c, b'/' | b'\\' | b'?' | b'#') && starts_with_windows_drive_letter(&s[1..])
     } else {
     } else {
         false
         false