Skip to content

Commit

Permalink
Fix no_std for deps
Browse files Browse the repository at this point in the history
  • Loading branch information
domenukk committed Apr 10, 2023
1 parent 0d14d5a commit 315eb43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
matrix.rust == 'nightly'
run: cargo test --test debugger_visualizer --features "url/serde,url/debugger_visualizer" -- --test-threads=1
- name: Test `no_std` support
run: cargo test --no-default-features --features=alloc
run: cargo +nightly test --no-default-features --features=alloc
- name: Build `aarch64-unknown-none` with `no_std`
run: cargo +nightly build -Zbuild-std=core,alloc --target aarch64-unknown-none -v --release
run: cargo +nightly build -Zbuild-std=core,alloc --target aarch64-unknown-none -v --release --no-default-features --features=alloc

WASM:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion url/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ serde = {version = "1.0", optional = true, features = ["derive"]}
[features]
default = ["std"]
std = ["idna/std", "percent-encoding/std", "form_urlencoded/std", "alloc"]
alloc = []
alloc = ["idna/alloc", "percent-encoding/alloc", "form_urlencoded/alloc"]
# UNSTABLE FEATURES (requires Rust nightly)
# Enable to use the #[debugger_visualizer] attribute.
debugger_visualizer = []
Expand Down
1 change: 1 addition & 0 deletions url/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2966,6 +2966,7 @@ fn file_url_segments_to_pathbuf(
host: Option<&str>,
segments: str::Split<'_, char>,
) -> Result<PathBuf, ()> {
use alloc::vec::Vec;
use percent_encoding::percent_decode;
use std::ffi::OsStr;
#[cfg(any(unix, target_os = "redox"))]
Expand Down

0 comments on commit 315eb43

Please sign in to comment.