Skip to content

Commit 4e38c16

Browse files
author
bors-servo
authored
Auto merge of servo#519 - servo:percent-encoding-consts, r=nox
percent-encoding: make sets be values of one type, instead of types that implement a trait Fix servo#388 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/519) <!-- Reviewable:end -->
2 parents e121d8d + a1fe49e commit 4e38c16

File tree

11 files changed

+278
-274
lines changed

11 files changed

+278
-274
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ script: cargo test --all-features --all
33

44
jobs:
55
include:
6-
- rust: 1.30.0
6+
- rust: 1.33.0
77
- rust: stable
88
- rust: beta
99
- rust: nightly

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bencher = "0.1"
3939
[dependencies]
4040
idna = { version = "0.2.0", path = "./idna" }
4141
matches = "0.1"
42-
percent-encoding = { version = "1.0.0", path = "./percent_encoding" }
42+
percent-encoding = { version = "2.0.0", path = "./percent_encoding" }
4343
serde = {version = "1.0", optional = true}
4444

4545
[[bench]]

data-url/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl<'a> FragmentIdentifier<'a> {
103103
match byte {
104104
// Ignore ASCII tabs or newlines like the URL parser would
105105
b'\t' | b'\n' | b'\r' => continue,
106-
// Fragment encode set
106+
// https://url.spec.whatwg.org/#fragment-percent-encode-set
107107
b'\0'...b' ' | b'"' | b'<' | b'>' | b'`' | b'\x7F'...b'\xFF' => {
108108
percent_encode(byte, &mut string)
109109
}
@@ -182,10 +182,10 @@ fn parse_header(from_colon_to_comma: &str) -> (mime::Mime, bool) {
182182
// Ignore ASCII tabs or newlines like the URL parser would
183183
b'\t' | b'\n' | b'\r' => continue,
184184

185-
// C0 encode set
185+
// https://url.spec.whatwg.org/#c0-control-percent-encode-set
186186
b'\0'...b'\x1F' | b'\x7F'...b'\xFF' => percent_encode(byte, &mut string),
187187

188-
// Bytes other than the C0 encode set that are percent-encoded
188+
// Bytes other than the C0 percent-encode set that are percent-encoded
189189
// by the URL parser in the query state.
190190
// '#' is also in that list but cannot occur here
191191
// since it indicates the start of the URL’s fragment.

percent_encoding/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
[package]
22
name = "percent-encoding"
3-
version = "1.0.2"
3+
version = "2.0.0"
44
authors = ["The rust-url developers"]
55
description = "Percent encoding and decoding"
66
repository = "https://github.com/servo/rust-url/"
77
license = "MIT/Apache-2.0"
88

99
[lib]
10-
doctest = false
1110
test = false
1211
path = "lib.rs"

0 commit comments

Comments
 (0)