Upgrade idna to 0.5.0 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/rust/crates/idna For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I96d7c0adb55f3ef853a1acee00c92f64964c832a
diff --git a/src/lib.rs b/src/lib.rs index 37d6387..92914f9 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -31,11 +31,23 @@ //! > This document specifies a mechanism //! > that minimizes the impact of this transition for client software, //! > allowing client software to access domains that are valid under either system. +#![no_std] + +// For forwards compatibility +#[cfg(feature = "std")] +extern crate std; + +extern crate alloc; + +#[cfg(not(feature = "alloc"))] +compile_error!("the `alloc` feature must be enabled"); #[cfg(test)] #[macro_use] extern crate assert_matches; +use alloc::string::String; + pub mod punycode; mod uts46;