standard_lib/collections/hash/map/error.rs
1use std::error::Error;
2use std::fmt::{self, Display, Formatter};
3
4#[derive(Debug)]
5pub struct IndexNoCap;
6
7impl Display for IndexNoCap {
8 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
9 write!(f, "Unable to calculate indicies for hash-based collection with capacity 0!")
10 }
11}
12
13impl Error for IndexNoCap {}