Skip to content

Commit

Permalink
feat(adapters-kv): fix formate
Browse files Browse the repository at this point in the history
Signed-off-by: owl <[email protected]>
  • Loading branch information
oowl committed Jun 22, 2023
1 parent 899ba19 commit 2a7a0ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/raw/adapters/typed_kv/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,25 +223,25 @@ impl<S: Adapter> Accessor for Backend<S> {
}

async fn rename(&self, from: &str, to: &str, _: OpRename) -> Result<RpRename> {
return match self.copy(from, to, OpCopy {}).await {
match self.copy(from, to, OpCopy {}).await {
Ok(_) => {
let from = build_abs_path(&self.root, from);
self.kv.delete(&from).await?;
Ok(RpRename::default())
}
Err(e) => Err(e),
};
}
}

fn blocking_rename(&self, from: &str, to: &str, _: OpRename) -> Result<RpRename> {
return match self.blocking_copy(from, to, OpCopy {}) {
match self.blocking_copy(from, to, OpCopy {}) {
Ok(_) => {
let from = build_abs_path(&self.root, from);
self.kv.blocking_delete(&from)?;
Ok(RpRename::default())
}
Err(e) => Err(e),
};
}
}

async fn copy(&self, from: &str, to: &str, _: OpCopy) -> Result<RpCopy> {
Expand Down

0 comments on commit 2a7a0ce

Please sign in to comment.