mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-09 20:31:05 +01:00
refactor: fix warnings
This commit is contained in:
parent
6fa01aa982
commit
16f826773b
3 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
use super::{super::Config, watchers::Watchers, DatabaseEngine, Tree};
|
use super::{super::Config, watchers::Watchers, DatabaseEngine, Tree};
|
||||||
use crate::{utils, Result};
|
use crate::{utils, Result};
|
||||||
use std::{future::Future, pin::Pin, sync::Arc, collections::HashMap, sync::RwLock};
|
use std::{future::Future, pin::Pin, sync::Arc, sync::RwLock};
|
||||||
|
|
||||||
pub struct Engine {
|
pub struct Engine {
|
||||||
rocks: rocksdb::DBWithThreadMode<rocksdb::MultiThreaded>,
|
rocks: rocksdb::DBWithThreadMode<rocksdb::MultiThreaded>,
|
||||||
|
@ -13,7 +13,7 @@ pub struct RocksDbEngineTree<'a> {
|
||||||
db: Arc<Engine>,
|
db: Arc<Engine>,
|
||||||
name: &'a str,
|
name: &'a str,
|
||||||
watchers: Watchers,
|
watchers: Watchers,
|
||||||
write_lock: RwLock<()>
|
write_lock: RwLock<()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn db_options(cache_capacity_bytes: usize, rocksdb_cache: &rocksdb::Cache) -> rocksdb::Options {
|
fn db_options(cache_capacity_bytes: usize, rocksdb_cache: &rocksdb::Cache) -> rocksdb::Options {
|
||||||
|
|
|
@ -172,7 +172,7 @@ impl SqliteTable {
|
||||||
|
|
||||||
let statement_ref = NonAliasingBox(statement);
|
let statement_ref = NonAliasingBox(statement);
|
||||||
|
|
||||||
let name = self.name.clone();
|
//let name = self.name.clone();
|
||||||
|
|
||||||
let iterator = Box::new(
|
let iterator = Box::new(
|
||||||
statement
|
statement
|
||||||
|
@ -267,7 +267,7 @@ impl Tree for SqliteTable {
|
||||||
let guard = self.engine.read_lock_iterator();
|
let guard = self.engine.read_lock_iterator();
|
||||||
let from = from.to_vec(); // TODO change interface?
|
let from = from.to_vec(); // TODO change interface?
|
||||||
|
|
||||||
let name = self.name.clone();
|
//let name = self.name.clone();
|
||||||
|
|
||||||
if backwards {
|
if backwards {
|
||||||
let statement = Box::leak(Box::new(
|
let statement = Box::leak(Box::new(
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use std::{
|
use std::{
|
||||||
collections::{hash_map, HashMap},
|
collections::{hash_map, HashMap},
|
||||||
sync::RwLock,
|
|
||||||
future::Future,
|
future::Future,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
|
sync::RwLock,
|
||||||
};
|
};
|
||||||
use tokio::sync::watch;
|
use tokio::sync::watch;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue