Skip to content

Commit 9706182

Browse files
committed
Make form_urlencoded no_std compatible
See SimonSapin/rust-std-candidates#23 for the `matches` version bump.
1 parent d673c4d commit 9706182

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

form_urlencoded/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ edition = "2018"
1111
test = false
1212

1313
[dependencies]
14-
matches = "0.1"
14+
matches = "0.1.9"
1515
percent-encoding = { version = "2.1.0", path = "../percent_encoding" }

form_urlencoded/src/lib.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@
1313
//! Converts between a string (such as an URL’s query string)
1414
//! and a sequence of (name, value) pairs.
1515
16+
#![no_std]
17+
extern crate alloc;
18+
1619
#[macro_use]
1720
extern crate matches;
1821

22+
use alloc::{
23+
borrow::{Borrow, Cow, ToOwned},
24+
string::String,
25+
};
26+
use core::str;
1927
use percent_encoding::{percent_decode, percent_encode_byte};
20-
use std::borrow::{Borrow, Cow};
21-
use std::str;
2228

2329
/// Convert a byte string in the `application/x-www-form-urlencoded` syntax
2430
/// into a iterator of (name, value) pairs.

0 commit comments

Comments
 (0)