Skip to content

Commit c5359a6

Browse files
committed
fmt
1 parent 75a195b commit c5359a6

5 files changed

Lines changed: 12 additions & 14 deletions

File tree

libsql-wal/src/replication/storage.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ where
4444
mut current: u64,
4545
until: u64,
4646
) -> Pin<Box<dyn Stream<Item = Result<Box<Frame>>> + Send + 'a>> {
47-
4847
Box::pin(async_stream::try_stream! {
4948
loop {
5049
let key = self.storage.find_segment(&self.namespace, FindSegmentReq::EndFrameNoLessThan(current), None).await?;

libsql-wal/src/storage/async_storage.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,7 @@ where
232232
config_override: Option<Self::Config>,
233233
) -> super::Result<super::SegmentKey> {
234234
let config = config_override.unwrap_or_else(|| self.backend.default_config());
235-
let key = self
236-
.backend
237-
.find_segment(
238-
&config,
239-
namespace,
240-
req,
241-
)
242-
.await?;
235+
let key = self.backend.find_segment(&config, namespace, req).await?;
243236
Ok(key)
244237
}
245238

libsql-wal/src/storage/backend/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(dead_code)]
2-
use std::sync::Arc;
32
use std::future::Future;
3+
use std::sync::Arc;
44

55
use chrono::{DateTime, Utc};
66
use fst::Map;

libsql-wal/src/storage/backend/s3.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ pub struct S3Backend<IO> {
3838
client: Client,
3939
default_config: Arc<S3Config>,
4040
io: IO,
41-
} impl S3Backend<StdIO> {
41+
}
42+
impl S3Backend<StdIO> {
4243
pub async fn from_sdk_config(
4344
aws_config: SdkConfig,
4445
bucket: String,
@@ -911,8 +912,11 @@ mod tests {
911912
.unwrap();
912913
assert_eq!(key.start_frame_no, 1);
913914
assert_eq!(key.end_frame_no, 64);
914-
915-
let index = storage.fetch_segment_index(&s3_config, &ns, &key).await.unwrap();
915+
916+
let index = storage
917+
.fetch_segment_index(&s3_config, &ns, &key)
918+
.await
919+
.unwrap();
916920
assert_eq!(index.get(42u32.to_be_bytes()).unwrap(), 42);
917921
}
918922
}

libsql-wal/src/storage/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,9 @@ impl<IO: Io> Storage for TestStorage<IO> {
569569
) -> Result<SegmentKey> {
570570
let inner = self.inner.lock().await;
571571
if inner.store {
572-
let FindSegmentReq::EndFrameNoLessThan(fno) = req else { panic!("unsupported lookup by ts") };
572+
let FindSegmentReq::EndFrameNoLessThan(fno) = req else {
573+
panic!("unsupported lookup by ts")
574+
};
573575
if let Some(segs) = inner.stored.get(namespace) {
574576
let Some((key, _path)) = segs.iter().find(|(k, _)| k.includes(fno)) else {
575577
return Err(Error::SegmentNotFound(req));

0 commit comments

Comments
 (0)