Andrew Brown
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
9 deletions
-
crates/wasi-nn/src/ctx.rs
|
|
@ -9,7 +9,7 @@ use std::hash::Hash; |
|
|
|
use thiserror::Error; |
|
|
|
use wiggle::GuestError; |
|
|
|
|
|
|
|
/// Possible errors for interacting with [WasiNnCtx].
|
|
|
|
/// Possible errors while interacting with [WasiNnCtx].
|
|
|
|
#[derive(Debug, Error)] |
|
|
|
pub enum WasiNnError { |
|
|
|
#[error("guest error")] |
|
|
@ -46,10 +46,6 @@ where |
|
|
|
key |
|
|
|
} |
|
|
|
|
|
|
|
pub fn remove(&mut self, key: K) -> Option<V> { |
|
|
|
self.entries.remove(&key) |
|
|
|
} |
|
|
|
|
|
|
|
pub fn get(&self, key: K) -> Option<&V> { |
|
|
|
self.entries.get(&key) |
|
|
|
} |
|
|
@ -58,10 +54,6 @@ where |
|
|
|
self.entries.get_mut(&key) |
|
|
|
} |
|
|
|
|
|
|
|
pub fn len(&self) -> usize { |
|
|
|
self.entries.len() |
|
|
|
} |
|
|
|
|
|
|
|
fn use_next_key(&mut self) -> K { |
|
|
|
let current = self.next_key; |
|
|
|
self.next_key += 1; |
|
|
|