mirror of
https://github.com/servo/rust-url
synced 2024-10-18 14:02:20 +00:00
Add std
feature to percent_encoding
For future compatibility
This commit is contained in:
parent
edeaea7f1e
commit
964fb73ebf
|
@ -3,11 +3,13 @@ name = "percent-encoding"
|
|||
version = "2.2.0"
|
||||
authors = ["The rust-url developers"]
|
||||
description = "Percent encoding and decoding"
|
||||
categories = ["no_std"]
|
||||
repository = "https://github.com/servo/rust-url/"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.51"
|
||||
|
||||
[features]
|
||||
default = ["alloc"]
|
||||
default = ["std"]
|
||||
std = ["alloc"]
|
||||
alloc = []
|
||||
|
|
|
@ -36,8 +36,12 @@
|
|||
//!
|
||||
//! assert_eq!(utf8_percent_encode("foo <bar>", FRAGMENT).to_string(), "foo%20%3Cbar%3E");
|
||||
//! ```
|
||||
|
||||
#![no_std]
|
||||
|
||||
// For forwards compatibility
|
||||
#[cfg(feature = "std")]
|
||||
extern crate std as _;
|
||||
|
||||
#[cfg(feature = "alloc")]
|
||||
extern crate alloc;
|
||||
|
||||
|
|
Loading…
Reference in a new issue