Skip to content

Commit

Permalink
cargo fmt pass
Browse files Browse the repository at this point in the history
  • Loading branch information
psarna committed Jan 22, 2024
1 parent 5f4a327 commit 353a29e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion libsql-replication/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ impl FrameEncryptor {
Ok(())
}
}

11 changes: 9 additions & 2 deletions libsql-replication/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,19 @@ pub struct SnapshotFile {
}

impl SnapshotFile {
pub async fn open(path: impl AsRef<Path>, encryptor: Option<crate::FrameEncryptor>) -> Result<Self, Error> {
pub async fn open(
path: impl AsRef<Path>,
encryptor: Option<crate::FrameEncryptor>,
) -> Result<Self, Error> {
let mut file = File::open(path).await?;
let mut header = SnapshotFileHeader::new_zeroed();
file.read_exact(&mut header.as_bytes_mut()).await?;

Ok(Self { file, header, encryptor })
Ok(Self {
file,
header,
encryptor,
})
}

pub fn into_stream_mut(mut self) -> impl Stream<Item = Result<FrameMut, Error>> {
Expand Down

0 comments on commit 353a29e

Please sign in to comment.