From b69862741f2d92b010e25087efc51880f4e61955 Mon Sep 17 00:00:00 2001 From: wangboo <5417808+wangboa@user.noreply.gitee.com> Date: Tue, 17 Jan 2023 19:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=82=E6=AD=A5=E7=9A=84?= =?UTF-8?q?=E5=BA=95=E5=B1=82=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 2 +- src/db/db.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f688ef..663baf7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ path = "src/lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] - +tokio = "1.24.1" [profile.dev] diff --git a/src/db/db.rs b/src/db/db.rs index f4b245e..84902bc 100644 --- a/src/db/db.rs +++ b/src/db/db.rs @@ -15,23 +15,23 @@ pub trait Snapshot {} impl DB { - fn open(_opt: Options, _name: String) -> Result { + async fn open(_opt: Options, _name: String) -> Result { todo!() } - fn put(&mut self, _opt: WriteOptions, _key: Slice, _value: Slice) -> Result<()> { + async fn put(&mut self, _opt: WriteOptions, _key: Slice, _value: Slice) -> Result<()> { todo!() } - fn delete(&mut self, _key: Slice) -> Result { + async fn delete(&mut self, _key: Slice) -> Result { todo!() } - fn write(&mut self, _opt: WriteBatchOptions, _updates: WriteBatch) -> Result<()> { + async fn write(&mut self, _opt: WriteBatchOptions, _updates: WriteBatch) -> Result<()> { todo!() } - fn get(&mut self, _opt: ReadOptions, _key: Slice) -> Result> { + async fn get(&mut self, _opt: ReadOptions, _key: Slice) -> Result> { todo!() } -- Gitee