Skip to content

Commit 4cd49b7

Browse files
Devdutt Shenoinikhilsinhaparseable
andauthored
get rid of stream_exists
Co-authored-by: Nikhil Sinha <[email protected]> Signed-off-by: Devdutt Shenoi <[email protected]>
1 parent ef53501 commit 4cd49b7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/parseable/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,8 @@ impl Parseable {
374374
stream_type: StreamType,
375375
log_source: LogSource,
376376
) -> Result<bool, PostError> {
377-
let mut stream_exists = false;
378377
if self.streams.contains(stream_name) {
379-
stream_exists = true;
380-
return Ok(stream_exists);
378+
return Ok(true);
381379
}
382380

383381
// For distributed deployments, if the stream not found in memory map,
@@ -388,7 +386,7 @@ impl Parseable {
388386
.create_stream_and_schema_from_storage(stream_name)
389387
.await?
390388
{
391-
return Ok(stream_exists);
389+
return Ok(false);
392390
}
393391

394392
self.create_stream(
@@ -403,7 +401,7 @@ impl Parseable {
403401
)
404402
.await?;
405403

406-
Ok(stream_exists)
404+
Ok(false)
407405
}
408406

409407
pub async fn create_update_stream(

0 commit comments

Comments
 (0)