Fixed unused imports and variables

This commit is contained in:
Sameh Abouel-saad
2025-05-29 13:41:10 +03:00
parent b0b6359be1
commit b82d457873
11 changed files with 31 additions and 24 deletions

View File

@@ -130,6 +130,7 @@ store.put(&js_value, Some(&JsValue::from_str(key)))?.await
#[cfg(not(target_arch = "wasm32"))]
pub struct WasmStore;
#[cfg(not(target_arch = "wasm32"))]
#[async_trait]
impl KVStore for WasmStore {
@@ -139,10 +140,16 @@ impl KVStore for WasmStore {
async fn set(&self, _key: &str, _value: &[u8]) -> Result<()> {
Err(KVError::Other("WasmStore is only available on wasm32 targets".to_string()))
}
async fn delete(&self, _key: &str) -> Result<()> {
async fn remove(&self, _key: &str) -> Result<()> {
Err(KVError::Other("WasmStore is only available on wasm32 targets".to_string()))
}
async fn exists(&self, _key: &str) -> Result<bool> {
async fn contains_key(&self, _key: &str) -> Result<bool> {
Err(KVError::Other("WasmStore is only available on wasm32 targets".to_string()))
}
async fn keys(&self) -> Result<Vec<String>> {
Err(KVError::Other("WasmStore is only available on wasm32 targets".to_string()))
}
async fn clear(&self) -> Result<()> {
Err(KVError::Other("WasmStore is only available on wasm32 targets".to_string()))
}
}