Move StaticVec definition to lib.rs.

This commit is contained in:
Stephen Chung
2020-10-10 13:41:55 +08:00
parent 95c4ac4180
commit 612ecc4ebc
14 changed files with 31 additions and 40 deletions

View File

@@ -21,8 +21,6 @@ use crate::stdlib::collections::hash_map::DefaultHasher;
#[cfg(feature = "no_std")]
use ahash::AHasher;
use smallvec::SmallVec;
/// A hasher that only takes one single `u64` and returns it as a hash key.
///
/// # Panics
@@ -93,11 +91,6 @@ pub fn calc_fn_hash<'a>(
s.finish()
}
/// _[INTERNALS]_ Alias to [`smallvec::SmallVec<[T; 4]>`](https://crates.io/crates/smallvec),
/// which is a specialized `Vec` backed by a small, fixed-size array when there are <= 4 items stored.
/// Exported under the `internals` feature only.
pub type StaticVec<T> = SmallVec<[T; 4]>;
/// The system immutable string type.
///
/// An `ImmutableString` wraps an `Rc<String>` (or `Arc<String>` under the `sync` feature)