Skip to content

Commit

Permalink
style: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Feb 8, 2024
1 parent ec24038 commit b20de39
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions storage/src/rocksdb_storage/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ use super::{
PrefixedRocksDbImmediateStorageContext, PrefixedRocksDbStorageContext,
PrefixedRocksDbTransactionContext,
};
use crate::Error::StorageError;
use crate::{
error,
error::Error::{CostError, RocksDBError},
storage::AbstractBatchOperation,
worst_case_costs::WorstKeyLength,
Error::StorageError,
Storage, StorageBatch,
};

Expand Down Expand Up @@ -512,10 +512,10 @@ impl RocksDbStorage {
}

impl<'db> Storage<'db> for RocksDbStorage {
type Transaction = Tx<'db>;
type BatchStorageContext = PrefixedRocksDbStorageContext<'db>;
type BatchTransactionalStorageContext = PrefixedRocksDbTransactionContext<'db>;
type ImmediateStorageContext = PrefixedRocksDbImmediateStorageContext<'db>;
type Transaction = Tx<'db>;

fn start_transaction(&'db self) -> Self::Transaction {
match self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ use grovedb_costs::{
use rocksdb::{ColumnFamily, OptimisticTransactionDB, WriteBatchWithTransaction};

use super::{make_prefixed_key, PrefixedRocksDbBatch, PrefixedRocksDbRawIterator};
use crate::rocksdb_storage::storage::NonTransactionalDb;
use crate::{
error,
error::Error::RocksDBError,
rocksdb_storage::storage::{SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
rocksdb_storage::storage::{
NonTransactionalDb, SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME,
},
StorageContext,
};

Expand Down
5 changes: 3 additions & 2 deletions storage/src/rocksdb_storage/storage_context/context_no_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ use grovedb_costs::{
use rocksdb::{ColumnFamily, OptimisticTransactionDB};

use super::{batch::PrefixedMultiContextBatchPart, make_prefixed_key, PrefixedRocksDbRawIterator};
use crate::rocksdb_storage::storage::NonTransactionalDb;
use crate::{
error,
error::Error::RocksDBError,
rocksdb_storage::storage::{SubtreePrefix, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
rocksdb_storage::storage::{
NonTransactionalDb, SubtreePrefix, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME,
},
StorageBatch, StorageContext,
};

Expand Down
9 changes: 6 additions & 3 deletions storage/src/rocksdb_storage/storage_context/context_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ use grovedb_costs::{
use rocksdb::{ColumnFamily, OptimisticTransactionDB};

use super::{batch::PrefixedMultiContextBatchPart, make_prefixed_key, PrefixedRocksDbRawIterator};
use crate::rocksdb_storage::storage::NonTransactionalDb;
use crate::rocksdb_storage::storage_context::context_no_tx::PrefixedSecondaryRocksDbStorageContext;
use crate::{
error,
error::Error::RocksDBError,
rocksdb_storage::storage::{SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
rocksdb_storage::{
storage::{
NonTransactionalDb, SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME,
},
storage_context::context_no_tx::PrefixedSecondaryRocksDbStorageContext,
},
RawIterator, StorageBatch, StorageContext,
};

Expand Down
3 changes: 1 addition & 2 deletions storage/src/rocksdb_storage/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@

//! Useful utilities for testing.

use std::cell::RefCell;
use std::ops::Deref;
use std::{cell::RefCell, ops::Deref};

use tempfile::TempDir;

Expand Down

0 comments on commit b20de39

Please sign in to comment.