From be26d210f1282fe8e05e54551a611300f7255ff3 Mon Sep 17 00:00:00 2001 From: Tpt Date: Thu, 8 Feb 2024 18:45:23 +0100 Subject: [PATCH] Removes unused StrLookup::contains_str --- lib/oxigraph/src/sparql/dataset.rs | 4 ---- lib/oxigraph/src/storage/binary_encoder.rs | 4 ---- lib/oxigraph/src/storage/mod.rs | 4 ---- lib/oxigraph/src/storage/numeric_encoder.rs | 2 -- 4 files changed, 14 deletions(-) diff --git a/lib/oxigraph/src/sparql/dataset.rs b/lib/oxigraph/src/sparql/dataset.rs index bf7e6195..3253be18 100644 --- a/lib/oxigraph/src/sparql/dataset.rs +++ b/lib/oxigraph/src/sparql/dataset.rs @@ -176,10 +176,6 @@ impl StrLookup for DatasetView { self.reader.get_str(key)? }) } - - fn contains_str(&self, key: &StrHash) -> Result { - Ok(self.extra.borrow().contains_key(key) || self.reader.contains_str(key)?) - } } struct EncodedDatasetSpec { diff --git a/lib/oxigraph/src/storage/binary_encoder.rs b/lib/oxigraph/src/storage/binary_encoder.rs index c06a8d7e..25626571 100644 --- a/lib/oxigraph/src/storage/binary_encoder.rs +++ b/lib/oxigraph/src/storage/binary_encoder.rs @@ -650,10 +650,6 @@ mod tests { fn get_str(&self, key: &StrHash) -> Result, StorageError> { Ok(self.id2str.borrow().get(key).cloned()) } - - fn contains_str(&self, key: &StrHash) -> Result { - Ok(self.id2str.borrow().contains_key(key)) - } } impl MemoryStrStore { diff --git a/lib/oxigraph/src/storage/mod.rs b/lib/oxigraph/src/storage/mod.rs index ce02449e..1f77d1b0 100644 --- a/lib/oxigraph/src/storage/mod.rs +++ b/lib/oxigraph/src/storage/mod.rs @@ -864,10 +864,6 @@ impl StrLookup for StorageReader { fn get_str(&self, key: &StrHash) -> Result, StorageError> { self.get_str(key) } - - fn contains_str(&self, key: &StrHash) -> Result { - self.contains_str(key) - } } pub struct StorageWriter<'a> { diff --git a/lib/oxigraph/src/storage/numeric_encoder.rs b/lib/oxigraph/src/storage/numeric_encoder.rs index a81b76e5..e730a163 100644 --- a/lib/oxigraph/src/storage/numeric_encoder.rs +++ b/lib/oxigraph/src/storage/numeric_encoder.rs @@ -701,8 +701,6 @@ impl From> for EncodedQuad { pub trait StrLookup { fn get_str(&self, key: &StrHash) -> Result, StorageError>; - - fn contains_str(&self, key: &StrHash) -> Result; } pub fn insert_term Result<(), StorageError>>(