diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d7d2aaae5..2d202663d 100644
--- a/.github/workflows/main.yml
+++ b/.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
diff --git a/data-url/Cargo.toml b/data-url/Cargo.toml
index 6765f4511..43c55863c 100644
--- a/data-url/Cargo.toml
+++ b/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"
diff --git a/form_urlencoded/Cargo.toml b/form_urlencoded/Cargo.toml
index 50173f6f9..6191cb840 100644
--- a/form_urlencoded/Cargo.toml
+++ b/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
diff --git a/idna/Cargo.toml b/idna/Cargo.toml
index 5a20b16dc..2c77469d3 100644
--- a/idna/Cargo.toml
+++ b/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
diff --git a/percent_encoding/Cargo.toml b/percent_encoding/Cargo.toml
index b9a61a55a..5b271c9c9 100644
--- a/percent_encoding/Cargo.toml
+++ b/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"]
diff --git a/url/Cargo.toml b/url/Cargo.toml
index d9bb1868d..2231d7550 100644
--- a/url/Cargo.toml
+++ b/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" }
diff --git a/url/src/parser.rs b/url/src/parser.rs
index 72118625f..b83bdd4f6 100644
--- a/url/src/parser.rs
+++ b/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