aboutsummaryrefslogtreecommitdiff
path: root/src/quirks.rs
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2021-05-07 17:07:20 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-05-07 17:07:20 +0000
commit6099cd2db6bc59f39c880e7eab64fd7fb0baab9c (patch)
tree1a6ded2c2ce9ce49062f522b36b4915644506edb /src/quirks.rs
parent288c2c63c01613336f6f6573a03b5899f51cf299 (diff)
parent3a826f53a618e1632a22ca7f1bc6c495a9c2ecc5 (diff)
downloadurl-6099cd2db6bc59f39c880e7eab64fd7fb0baab9c.tar.gz
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/url/+/1700025 Change-Id: Ib37a1fc94e92473aaa93dc238122ee4e18179374
Diffstat (limited to 'src/quirks.rs')
-rw-r--r--src/quirks.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quirks.rs b/src/quirks.rs
index 72dadaa..0dbc6eb 100644
--- a/src/quirks.rs
+++ b/src/quirks.rs
@@ -56,7 +56,7 @@ pub fn protocol(url: &Url) -> &str {
}
/// Setter for https://url.spec.whatwg.org/#dom-url-protocol
-#[allow(clippy::clippy::result_unit_err)]
+#[allow(clippy::result_unit_err)]
pub fn set_protocol(url: &mut Url, mut new_protocol: &str) -> Result<(), ()> {
// The scheme state in the spec ignores everything after the first `:`,
// but `set_scheme` errors if there is more.
@@ -73,7 +73,7 @@ pub fn username(url: &Url) -> &str {
}
/// Setter for https://url.spec.whatwg.org/#dom-url-username
-#[allow(clippy::clippy::result_unit_err)]
+#[allow(clippy::result_unit_err)]
pub fn set_username(url: &mut Url, new_username: &str) -> Result<(), ()> {
url.set_username(new_username)
}
@@ -85,7 +85,7 @@ pub fn password(url: &Url) -> &str {
}
/// Setter for https://url.spec.whatwg.org/#dom-url-password
-#[allow(clippy::clippy::result_unit_err)]
+#[allow(clippy::result_unit_err)]
pub fn set_password(url: &mut Url, new_password: &str) -> Result<(), ()> {
url.set_password(if new_password.is_empty() {
None
@@ -101,7 +101,7 @@ pub fn host(url: &Url) -> &str {
}
/// Setter for https://url.spec.whatwg.org/#dom-url-host
-#[allow(clippy::clippy::result_unit_err)]
+#[allow(clippy::result_unit_err)]
pub fn set_host(url: &mut Url, new_host: &str) -> Result<(), ()> {
// If context object’s url’s cannot-be-a-base-URL flag is set, then return.
if url.cannot_be_a_base() {
@@ -158,7 +158,7 @@ pub fn hostname(url: &Url) -> &str {
}
/// Setter for https://url.spec.whatwg.org/#dom-url-hostname
-#[allow(clippy::clippy::result_unit_err)]
+#[allow(clippy::result_unit_err)]
pub fn set_hostname(url: &mut Url, new_hostname: &str) -> Result<(), ()> {
if url.cannot_be_a_base() {
return Err(());
@@ -200,7 +200,7 @@ pub fn port(url: &Url) -> &str {
}
/// Setter for https://url.spec.whatwg.org/#dom-url-port
-#[allow(clippy::clippy::result_unit_err)]
+#[allow(clippy::result_unit_err)]
pub fn set_port(url: &mut Url, new_port: &str) -> Result<(), ()> {
let result;
{