Skip to content

Commit b994626

Browse files
committed
Rename method
1 parent 452b72d commit b994626

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/asimov-snapshot/src/storage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::Snapshot;
1212

1313
pub trait Storage {
1414
fn save(&self, snapshot: &Snapshot) -> Result<()> {
15-
self.save_timestamp(snapshot)?;
15+
self.save_snapshot(snapshot)?;
1616
match self.current_version(&snapshot.url) {
1717
Ok(current) if snapshot.start_timestamp > current => {
1818
self.set_current_version(&snapshot.url, snapshot.start_timestamp)
@@ -26,7 +26,7 @@ pub trait Storage {
2626
}
2727
}
2828

29-
fn save_timestamp(&self, _snapshot: &Snapshot) -> Result<()>;
29+
fn save_snapshot(&self, _snapshot: &Snapshot) -> Result<()>;
3030

3131
fn read(&self, _url: impl AsRef<str>, _timestamp: Timestamp) -> Result<Snapshot>;
3232

lib/asimov-snapshot/src/storage/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Fs {
3030

3131
impl super::Storage for Fs {
3232
#[tracing::instrument(skip_all, fields(url = snapshot.url))]
33-
fn save_timestamp(&self, snapshot: &Snapshot) -> Result<()> {
33+
fn save_snapshot(&self, snapshot: &Snapshot) -> Result<()> {
3434
let url_hash = hex::encode(sha256(&snapshot.url));
3535
let final_url_dir = std::path::Path::new(&url_hash);
3636

0 commit comments

Comments
 (0)