Skip to content

Commit f7c95bb

Browse files
committed
Trying 2.5.5
1 parent a40f904 commit f7c95bb

5 files changed

Lines changed: 34 additions & 8 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Coverage
33
on:
44
push:
55
branches: ["main"]
6-
pull_request:
76

87
jobs:
98
coverage:

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
Test:
1515
strategy:
1616
matrix:
17-
os: [ubuntu-latest, macos-latest, windows-latest]
18-
rust: [1.63.0, 1.82.0, stable, beta, nightly]
17+
os: [windows-latest]
18+
rust: [stable]
1919
exclude:
2020
- os: macos-latest
2121
rust: 1.82.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
target
22
Cargo.lock
33
/.cargo/config
4+
.DS_Store

url/Cargo.toml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,31 @@ categories = ["parser-implementations", "web-programming", "encoding", "no-std"]
1414
license = "MIT OR Apache-2.0"
1515
include = ["src/**/*", "LICENSE-*", "README.md", "tests/**"]
1616
edition = "2018"
17-
rust-version = "1.63" # From libc
17+
rust-version = "1.63" # From libc
1818

1919
[dev-dependencies]
2020
serde = { version = "1.0", features = ["derive"] }
2121
serde_json = "1.0"
2222
bencher = "0.1"
23+
tempfile = { version = "3" }
2324

2425
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
2526
wasm-bindgen-test = "0.3"
2627

2728
[dependencies]
28-
form_urlencoded = { version = "1.2.1", path = "../form_urlencoded", default-features = false, features = ["alloc"] }
29-
idna = { version = "1.0.3", path = "../idna", default-features = false, features = ["alloc", "compiled_data"] }
30-
percent-encoding = { version = "2.3.1", path = "../percent_encoding", default-features = false, features = ["alloc"] }
31-
serde = { version = "1.0", optional = true, features = ["derive"], default-features = false }
29+
form_urlencoded = { version = "1.2.1", path = "../form_urlencoded", default-features = false, features = [
30+
"alloc",
31+
] }
32+
idna = { version = "1.0.3", path = "../idna", default-features = false, features = [
33+
"alloc",
34+
"compiled_data",
35+
] }
36+
percent-encoding = { version = "2.3.1", path = "../percent_encoding", default-features = false, features = [
37+
"alloc",
38+
] }
39+
serde = { version = "1.0", optional = true, features = [
40+
"derive",
41+
], default-features = false }
3242

3343
[features]
3444
default = ["std"]

url/tests/unit.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,3 +1383,19 @@ fn serde_error_message() {
13831383
r#"relative URL without a base: "§invalid#+#*Ä" at line 1 column 25"#
13841384
);
13851385
}
1386+
1387+
// https://github.com/servo/rust-url/issues/1077
1388+
#[cfg(feature = "std")]
1389+
#[test]
1390+
fn test_url_parsing() {
1391+
let tmpdir = tempfile::tempdir().unwrap();
1392+
let tmp_path = tmpdir.path().to_str().unwrap();
1393+
let tmp_path = tmp_path.replace("\\", "%5C");
1394+
let mut url = url::Url::parse("file://").unwrap();
1395+
url.path_segments_mut()
1396+
.unwrap()
1397+
.pop_if_empty()
1398+
.extend(std::iter::once(tmp_path));
1399+
dbg!(&url);
1400+
url.to_file_path().unwrap();
1401+
}

0 commit comments

Comments
 (0)