primitive.rs: Fix doc typo.

Fortune for smallmap's current commit: Future blessing − 末吉
master
Avril 3 years ago
parent 4841a77be2
commit 463e83ab31
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -9,8 +9,20 @@ authors = ["Avril <flanchan@cumallover.me>"]
edition = "2018"
license = "MIT"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "unwind"
strip=true
[features]
# TODO: maybe add an FFI feature, to allow C projects to use it? idk if that's worth it really...
[dependencies]
serde = {version = "1.0.116", features = ["derive"], optional = true}
# TODO: optional smallvec feature: instead of heap-allocating the first page, it can be placed on the stack.
[dev-dependencies]
serde_json = "1.0.59"

@ -212,7 +212,7 @@ where K: Collapse
/// A small hashtable-like map with byte sized key indecies.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
#[cfg_attr(feature="serde", derive(serde::Serialize, serde::Deserialize))]
// TODO: Replace with SmallVec<[Page<TKey, TValue>; 1]> maybe?
// TODO: Replace with `SmallVec<[Page<TKey, TValue>; 1]>` when feature that adds `smallvec` is enabled (this will allocate the first page on the stack, and the rest on the heap.
pub struct Map<TKey, TValue>(Vec<Page<TKey,TValue>>);
impl<K,V> Map<K,V>

@ -1,4 +1,4 @@
//! Contains `Collapse` impls for primitive types through a newtime shim.
//! Contains `Collapse` impls for primitive types through a newtype shim.
//!
//! # Why
//! Such wrappers are a workaround for the lack of template specialisation available in Rust so far, as the generic `impl<T: Hash> Collapse<T> for T` still requires computing the hash of the internal types before reducing to the `u8` page index.

Loading…
Cancel
Save