Use no-std-compat to build no-std.

This commit is contained in:
Stephen Chung
2021-04-17 15:15:54 +08:00
parent 2f2b7403cb
commit 01f0cc028b
48 changed files with 293 additions and 293 deletions

View File

@@ -1,8 +1,10 @@
//! Module that defines the [`Scope`] type representing a function call-stack scope.
use crate::dynamic::{AccessMode, Variant};
use crate::stdlib::{borrow::Cow, boxed::Box, iter, vec::Vec};
use crate::{Dynamic, Identifier, StaticVec};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
use std::{borrow::Cow, iter::Extend};
/// Keep a number of entries inline (since [`Dynamic`] is usually small enough).
const SCOPE_SIZE: usize = 16;
@@ -498,7 +500,7 @@ impl<'a> Scope<'a> {
}
}
impl<'a, K: Into<Cow<'a, str>>> iter::Extend<(K, Dynamic)> for Scope<'a> {
impl<'a, K: Into<Cow<'a, str>>> Extend<(K, Dynamic)> for Scope<'a> {
#[inline(always)]
fn extend<T: IntoIterator<Item = (K, Dynamic)>>(&mut self, iter: T) {
iter.into_iter().for_each(|(name, value)| {