computer: part 2

This commit is contained in:
nym21
2025-03-20 21:40:06 +01:00
parent 29c10f8854
commit 52cfbf60d4
24 changed files with 997 additions and 107 deletions
@@ -19,6 +19,7 @@ where
+ Sync,
{
fn to_usize(self) -> Result<usize>;
fn to_string<'a>() -> &'a str;
}
impl<I> StoredIndex for I
where
@@ -40,4 +41,9 @@ where
fn to_usize(self) -> Result<usize> {
self.try_into().map_err(|_| Error::FailedKeyTryIntoUsize)
}
#[inline]
fn to_string<'a>() -> &'a str {
std::any::type_name::<I>()
}
}