wasi-nn: remove unused functions (#2427)

This commit is contained in:
Andrew Brown
2020-11-18 07:21:51 -08:00
committed by GitHub
parent e7df081696
commit 3d606a01e5

View File

@@ -9,7 +9,7 @@ use std::hash::Hash;
use thiserror::Error; use thiserror::Error;
use wiggle::GuestError; use wiggle::GuestError;
/// Possible errors for interacting with [WasiNnCtx]. /// Possible errors while interacting with [WasiNnCtx].
#[derive(Debug, Error)] #[derive(Debug, Error)]
pub enum WasiNnError { pub enum WasiNnError {
#[error("guest error")] #[error("guest error")]
@@ -46,10 +46,6 @@ where
key key
} }
pub fn remove(&mut self, key: K) -> Option<V> {
self.entries.remove(&key)
}
pub fn get(&self, key: K) -> Option<&V> { pub fn get(&self, key: K) -> Option<&V> {
self.entries.get(&key) self.entries.get(&key)
} }
@@ -58,10 +54,6 @@ where
self.entries.get_mut(&key) self.entries.get_mut(&key)
} }
pub fn len(&self) -> usize {
self.entries.len()
}
fn use_next_key(&mut self) -> K { fn use_next_key(&mut self) -> K {
let current = self.next_key; let current = self.next_key;
self.next_key += 1; self.next_key += 1;