Skip to content

Commit 6e96d09

Browse files
committed
chore: simplification
1 parent d812994 commit 6e96d09

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/metastore/metastores/object_store_metastore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ impl Metastore for ObjectStoreMetastore {
554554
return Ok(false);
555555
}
556556

557-
let all_filters = match PARSEABLE.metastore.get_filters().await {
557+
let all_filters = match self.get_filters().await {
558558
Ok(all_f) => all_f,
559559
Err(e) => {
560560
return Err(e);
@@ -568,7 +568,7 @@ impl Metastore for ObjectStoreMetastore {
568568
.collect();
569569

570570
for filter in filters_for_stream.iter() {
571-
PARSEABLE.metastore.delete_filter(filter).await?;
571+
self.delete_filter(filter).await?;
572572

573573
if let Some(filter_id) = filter.filter_id.as_ref() {
574574
FILTERS.delete_filter(filter_id).await;

src/parseable/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,7 @@ impl Parseable {
237237

238238
// check if a stream exists
239239
pub fn check_stream_exists(&self, stream_name: &str) -> bool {
240-
if self.streams.contains(stream_name) {
241-
return true;
242-
} else {
243-
return false;
244-
}
240+
self.streams.contains(stream_name)
245241
}
246242

247243
// validate the storage, if the proper path for staging directory is provided

0 commit comments

Comments
 (0)