Skip to content

Commit

Permalink
upgrade rust-toolchain version
Browse files Browse the repository at this point in the history
  • Loading branch information
KKould committed Oct 14, 2023
1 parent 863b2ae commit d13d285
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ tokio = { version = "1.28.2", features = ["full"] }
serde = { version = "1", features = ["derive", "rc"] }
serde_json = "1"
bincode = "1.3.3"
async-trait = "0.1.68"
integer-encoding = "3.0.4"
strum_macros = "0.24"
ordered-float = "3.0"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2023-09-29
nightly-2023-10-13
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#![feature(iterator_try_collect)]
#![feature(slice_pattern)]
#![feature(bound_map)]
#![feature(async_fn_in_trait)]
extern crate core;
pub mod binder;
pub mod catalog;
Expand Down
3 changes: 0 additions & 3 deletions src/storage/kip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::types::errors::TypeError;
use crate::types::index::{Index, IndexMeta, IndexMetaRef};
use crate::types::tuple::{Tuple, TupleId};
use crate::types::value::ValueRef;
use async_trait::async_trait;
use kip_db::kernel::lsm::iterator::Iter as KipDBIter;
use kip_db::kernel::lsm::mvcc::TransactionIter;
use kip_db::kernel::lsm::storage::Config;
Expand Down Expand Up @@ -37,7 +36,6 @@ impl KipStorage {
}
}

#[async_trait]
impl Storage for KipStorage {
type TransactionType = KipTransaction;

Expand All @@ -56,7 +54,6 @@ pub struct KipTransaction {
cache: ShardingLruCache<String, TableCatalog>,
}

#[async_trait]
impl Transaction for KipTransaction {
type IterType<'a> = KipIter<'a>;

Expand Down
7 changes: 4 additions & 3 deletions src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ use crate::storage::table_codec::TableCodec;
use crate::types::errors::TypeError;
use crate::types::index::{Index, IndexMetaRef};
use crate::types::tuple::{Tuple, TupleId};
use async_trait::async_trait;
use kip_db::error::CacheError;
use kip_db::kernel::lsm::mvcc;
use kip_db::KernelError;
use std::collections::VecDeque;
use std::ops::SubAssign;

#[async_trait]

pub trait Storage: Sync + Send + Clone + 'static {
type TransactionType: Transaction;

#[allow(async_fn_in_trait)]
async fn transaction(&self) -> Result<Self::TransactionType, StorageError>;
}

/// Optional bounds of the reader, of the form (offset, limit).
pub(crate) type Bounds = (Option<usize>, Option<usize>);
type Projections = Vec<ScalarExpression>;

#[async_trait]

pub trait Transaction: Sync + Send + 'static {
type IterType<'a>: Iter;

Expand Down Expand Up @@ -80,6 +80,7 @@ pub trait Transaction: Sync + Send + 'static {

fn show_tables(&self) -> Result<Vec<String>, StorageError>;

#[allow(async_fn_in_trait)]
async fn commit(self) -> Result<(), StorageError>;
}

Expand Down

0 comments on commit d13d285

Please sign in to comment.