Skip to content

percent-encoding: make sets be values of one type, instead of types that implement a trait #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ script: cargo test --all-features --all

jobs:
include:
- rust: 1.30.0
- rust: 1.33.0
- rust: stable
- rust: beta
- rust: nightly
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bencher = "0.1"
[dependencies]
idna = { version = "0.2.0", path = "./idna" }
matches = "0.1"
percent-encoding = { version = "1.0.0", path = "./percent_encoding" }
percent-encoding = { version = "2.0.0", path = "./percent_encoding" }
serde = {version = "1.0", optional = true}

[[bench]]
Expand Down
6 changes: 3 additions & 3 deletions data-url/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl<'a> FragmentIdentifier<'a> {
match byte {
// Ignore ASCII tabs or newlines like the URL parser would
b'\t' | b'\n' | b'\r' => continue,
// Fragment encode set
// https://url.spec.whatwg.org/#fragment-percent-encode-set
b'\0'...b' ' | b'"' | b'<' | b'>' | b'`' | b'\x7F'...b'\xFF' => {
percent_encode(byte, &mut string)
}
Expand Down Expand Up @@ -182,10 +182,10 @@ fn parse_header(from_colon_to_comma: &str) -> (mime::Mime, bool) {
// Ignore ASCII tabs or newlines like the URL parser would
b'\t' | b'\n' | b'\r' => continue,

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

// Bytes other than the C0 encode set that are percent-encoded
// Bytes other than the C0 percent-encode set that are percent-encoded
// by the URL parser in the query state.
// '#' is also in that list but cannot occur here
// since it indicates the start of the URL’s fragment.
Expand Down
3 changes: 1 addition & 2 deletions percent_encoding/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[package]
name = "percent-encoding"
version = "1.0.2"
version = "2.0.0"
authors = ["The rust-url developers"]
description = "Percent encoding and decoding"
repository = "https://github.com/servo/rust-url/"
license = "MIT/Apache-2.0"

[lib]
doctest = false
test = false
path = "lib.rs"
Loading