xso: Add std feature ; default-features compiles in no-std
This commit is contained in:
parent
6e3f31ef46
commit
1c1b960265
8 changed files with 71 additions and 29 deletions
|
|
@ -6,7 +6,10 @@
|
|||
|
||||
//! Utilities which may eventually move upstream to the `rxml` crate.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use alloc::{
|
||||
borrow::{Cow, ToOwned},
|
||||
string::String,
|
||||
};
|
||||
|
||||
use rxml::{parser::EventMetrics, AttrMap, Event, Namespace, NcName, NcNameStr, XmlVersion};
|
||||
|
||||
|
|
@ -283,6 +286,8 @@ impl<'x, I: Iterator<Item = Result<Item<'x>, crate::error::Error>>> Iterator for
|
|||
mod tests_minidom {
|
||||
use super::*;
|
||||
|
||||
use alloc::{string::ToString, vec, vec::Vec};
|
||||
|
||||
fn events_to_items<I: Iterator<Item = Event>>(events: I) -> Vec<Item<'static>> {
|
||||
let iter = EventToItem {
|
||||
inner: events.map(|ev| Ok(ev)),
|
||||
|
|
@ -423,6 +428,8 @@ mod tests_minidom {
|
|||
mod tests {
|
||||
use super::*;
|
||||
|
||||
use alloc::{vec, vec::Vec};
|
||||
|
||||
fn items_to_events<'x, I: IntoIterator<Item = Item<'x>>>(
|
||||
items: I,
|
||||
) -> Result<Vec<Event>, crate::error::Error> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue