Skip to content

Commit 3bf9eac

Browse files
committed
Merge branch 'main' into no_std
2 parents c8d8e6d + 9404ff5 commit 3bf9eac

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ jobs:
5555
if: |
5656
matrix.os == 'windows-latest' &&
5757
matrix.rust != '1.56.0'
58-
run: cargo test --test debugger_visualizer --features "url/debugger_visualizer,url_debug_tests/debugger_visualizer" -- --test-threads=1
58+
run: cargo test --test debugger_visualizer --features "url/debugger_visualizer,url_debug_tests/debugger_visualizer" -- --test-threads=1 || echo "debugger test failed"
59+
continue-on-error: true # Fails on GH actions, but not locally.
5960
- name: Test `no_std` support
6061
run: cargo test --no-default-features --features=alloc
6162
- name: Build `url` crate for `aarch64-unknown-none` with `no_std`

idna/src/punycode.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ fn value_to_digit(value: u32) -> char {
324324
#[cfg(target_pointer_width = "64")]
325325
fn huge_encode() {
326326
let mut buf = String::new();
327-
assert!(encode_into(std::iter::repeat('ß').take(u32::MAX as usize + 1), &mut buf).is_err());
327+
assert!(encode_into(
328+
core::iter::repeat('ß').take(u32::MAX as usize + 1),
329+
&mut buf
330+
)
331+
.is_err());
328332
assert_eq!(buf.len(), 0);
329333
}

url/src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ url = { version = "2", features = ["debugger_visualizer"] }
148148
feature = "debugger_visualizer",
149149
debugger_visualizer(natvis_file = "../../debug_metadata/url.natvis")
150150
)]
151+
// We use std::os::wasi::prelude::OsStrExt, and that is conditionally feature gated
152+
// to be unstable on wasm32-wasip2. https://github.com/rust-lang/rust/issues/130323
153+
#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
151154

152155
pub use form_urlencoded;
153156

@@ -407,10 +410,10 @@ impl Url {
407410
/// # Notes
408411
///
409412
/// - A trailing slash is significant.
410-
/// Without it, the last path component is considered to be a “file” name
411-
/// to be removed to get at the “directory” that is used as the base.
413+
/// Without it, the last path component is considered to be a “file” name
414+
/// to be removed to get at the “directory” that is used as the base.
412415
/// - A [scheme relative special URL](https://url.spec.whatwg.org/#scheme-relative-special-url-string)
413-
/// as input replaces everything in the base URL after the scheme.
416+
/// as input replaces everything in the base URL after the scheme.
414417
/// - An absolute URL (with a scheme) as input replaces the whole base URL (even the scheme).
415418
///
416419
/// # Examples

0 commit comments

Comments
 (0)