aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/headers.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2020-01-18 01:29:26 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2020-01-18 14:22:15 +0530
commitf7db4b7f8011239f01c3ba2e5e402c866fbe68fb (patch)
treea57f171e34f1df63302eeee5e7b7544baf461158 /components/script/dom/headers.rs
parent2a594821ba44ba2c13e9a39c6fd8c5a450bd06f4 (diff)
downloadservo-f7db4b7f8011239f01c3ba2e5e402c866fbe68fb.tar.gz
servo-f7db4b7f8011239f01c3ba2e5e402c866fbe68fb.zip
Modify `script` to prevent further violations of snake_case
Diffstat (limited to 'components/script/dom/headers.rs')
-rw-r--r--components/script/dom/headers.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/headers.rs b/components/script/dom/headers.rs
index a75b0292d6f..f16d24604db 100644
--- a/components/script/dom/headers.rs
+++ b/components/script/dom/headers.rs
@@ -50,6 +50,7 @@ impl Headers {
}
// https://fetch.spec.whatwg.org/#dom-headers
+ #[allow(non_snake_case)]
pub fn Constructor(
global: &GlobalScope,
init: Option<HeadersInit>,
@@ -393,13 +394,13 @@ pub fn normalize_value(value: ByteString) -> ByteString {
}
}
-fn is_HTTP_whitespace(byte: u8) -> bool {
+fn is_http_whitespace(byte: u8) -> bool {
byte == b'\t' || byte == b'\n' || byte == b'\r' || byte == b' '
}
fn index_of_first_non_whitespace(value: &ByteString) -> Option<usize> {
for (index, &byte) in value.iter().enumerate() {
- if !is_HTTP_whitespace(byte) {
+ if !is_http_whitespace(byte) {
return Some(index);
}
}
@@ -408,7 +409,7 @@ fn index_of_first_non_whitespace(value: &ByteString) -> Option<usize> {
fn index_of_last_non_whitespace(value: &ByteString) -> Option<usize> {
for (index, &byte) in value.iter().enumerate().rev() {
- if !is_HTTP_whitespace(byte) {
+ if !is_http_whitespace(byte) {
return Some(index);
}
}