Kaynağa Gözat

Merge pull request #786 from ridwanabdillahi/fix_build_break

Update the minimum rust-version to 1.51 to fix Rust 1.45.0 CI failure
Valentin Gosu 4 yıl önce
ebeveyn
işleme
d6b4cda3d8

+ 3 - 3
.github/workflows/main.yml

@@ -13,12 +13,12 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest, macos-latest, windows-latest]
-        rust: [1.45.0, stable, beta, nightly]
+        rust: [1.51.0, stable, beta, nightly]
         exclude:
           - os: macos-latest
-            rust: 1.45.0
+            rust: 1.51.0
           - os: windows-latest
-            rust: 1.45.0
+            rust: 1.51.0
           - os: macos-latest
             rust: beta
           - os: windows-latest

+ 1 - 1
data-url/Cargo.toml

@@ -7,7 +7,7 @@ repository = "https://github.com/servo/rust-url"
 license = "MIT OR Apache-2.0"
 edition = "2018"
 autotests = false
-rust-version = "1.45"
+rust-version = "1.51"
 
 [dev-dependencies]
 tester = "0.9"

+ 1 - 1
form_urlencoded/Cargo.toml

@@ -6,7 +6,7 @@ description = "Parser and serializer for the application/x-www-form-urlencoded s
 repository = "https://github.com/servo/rust-url"
 license = "MIT OR Apache-2.0"
 edition = "2018"
-rust-version = "1.45"
+rust-version = "1.51"
 
 [lib]
 test = false

+ 1 - 1
idna/Cargo.toml

@@ -7,7 +7,7 @@ repository = "https://github.com/servo/rust-url/"
 license = "MIT OR Apache-2.0"
 autotests = false
 edition = "2018"
-rust-version = "1.45"
+rust-version = "1.51"
 
 [lib]
 doctest = false

+ 1 - 1
percent_encoding/Cargo.toml

@@ -6,7 +6,7 @@ description = "Percent encoding and decoding"
 repository = "https://github.com/servo/rust-url/"
 license = "MIT OR Apache-2.0"
 edition = "2018"
-rust-version = "1.45"
+rust-version = "1.51"
 
 [features]
 default = ["alloc"]

+ 1 - 1
url/Cargo.toml

@@ -14,7 +14,7 @@ categories = ["parser-implementations", "web-programming", "encoding"]
 license = "MIT OR Apache-2.0"
 include = ["src/**/*", "LICENSE-*", "README.md", "tests/**"]
 edition = "2018"
-rust-version = "1.45"
+rust-version = "1.51"
 
 [badges]
 travis-ci = { repository = "servo/rust-url" }

+ 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 {
     File,
     SpecialNotFile,
@@ -1561,7 +1561,7 @@ pub fn is_windows_drive_letter(segment: &str) -> bool {
 /// Whether path starts with a root slash
 /// and a windows drive letter eg: "/c:" or "/a:/"
 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..])
     } else {
         false