INNER CODE UNIT · Rust

fmt

lunatic-solutions/lunatic · crates/hash-map-id/src/lib.rs:50

    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.debug_struct("HashMapId")
            .field("id_seed", &self.id_seed)
            .field("type", &type_name::<T>())
            .finish()
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    // get

    #[test]
    fn get_returns_none_for_non_existent_item() {
        let hash: HashMapId<i32> = HashMapId::new();
        let item = hash.get(10);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…