apply new rustfmt.toml changes, fix some clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -17,18 +17,12 @@ pub(crate) struct Items<'a> {
|
||||
|
||||
impl<'a> Items<'a> {
|
||||
pub(crate) fn new(db: &'a Arc<Engine>, cf: &'a Arc<ColumnFamily>, opts: ReadOptions) -> Self {
|
||||
Self {
|
||||
state: State::new(db, cf, opts),
|
||||
}
|
||||
Self { state: State::new(db, cf, opts) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> convert::From<State<'a>> for Items<'a> {
|
||||
fn from(state: State<'a>) -> Self {
|
||||
Self {
|
||||
state,
|
||||
}
|
||||
}
|
||||
fn from(state: State<'a>) -> Self { Self { state } }
|
||||
}
|
||||
|
||||
impl<'a> Cursor<'a, KeyVal<'a>> for Items<'a> {
|
||||
@@ -40,11 +34,7 @@ impl<'a> Cursor<'a, KeyVal<'a>> for Items<'a> {
|
||||
fn seek(&mut self) { self.state.seek_fwd(); }
|
||||
|
||||
#[inline]
|
||||
fn init(self, from: From<'a>) -> Self {
|
||||
Self {
|
||||
state: self.state.init_fwd(from),
|
||||
}
|
||||
}
|
||||
fn init(self, from: From<'a>) -> Self { Self { state: self.state.init_fwd(from) } }
|
||||
}
|
||||
|
||||
impl<'a> Stream for Items<'a> {
|
||||
|
||||
@@ -17,18 +17,12 @@ pub(crate) struct ItemsRev<'a> {
|
||||
|
||||
impl<'a> ItemsRev<'a> {
|
||||
pub(crate) fn new(db: &'a Arc<Engine>, cf: &'a Arc<ColumnFamily>, opts: ReadOptions) -> Self {
|
||||
Self {
|
||||
state: State::new(db, cf, opts),
|
||||
}
|
||||
Self { state: State::new(db, cf, opts) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> convert::From<State<'a>> for ItemsRev<'a> {
|
||||
fn from(state: State<'a>) -> Self {
|
||||
Self {
|
||||
state,
|
||||
}
|
||||
}
|
||||
fn from(state: State<'a>) -> Self { Self { state } }
|
||||
}
|
||||
|
||||
impl<'a> Cursor<'a, KeyVal<'a>> for ItemsRev<'a> {
|
||||
@@ -40,11 +34,7 @@ impl<'a> Cursor<'a, KeyVal<'a>> for ItemsRev<'a> {
|
||||
fn seek(&mut self) { self.state.seek_rev(); }
|
||||
|
||||
#[inline]
|
||||
fn init(self, from: From<'a>) -> Self {
|
||||
Self {
|
||||
state: self.state.init_rev(from),
|
||||
}
|
||||
}
|
||||
fn init(self, from: From<'a>) -> Self { Self { state: self.state.init_rev(from) } }
|
||||
}
|
||||
|
||||
impl<'a> Stream for ItemsRev<'a> {
|
||||
|
||||
@@ -17,18 +17,12 @@ pub(crate) struct Keys<'a> {
|
||||
|
||||
impl<'a> Keys<'a> {
|
||||
pub(crate) fn new(db: &'a Arc<Engine>, cf: &'a Arc<ColumnFamily>, opts: ReadOptions) -> Self {
|
||||
Self {
|
||||
state: State::new(db, cf, opts),
|
||||
}
|
||||
Self { state: State::new(db, cf, opts) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> convert::From<State<'a>> for Keys<'a> {
|
||||
fn from(state: State<'a>) -> Self {
|
||||
Self {
|
||||
state,
|
||||
}
|
||||
}
|
||||
fn from(state: State<'a>) -> Self { Self { state } }
|
||||
}
|
||||
|
||||
impl<'a> Cursor<'a, Key<'a>> for Keys<'a> {
|
||||
@@ -41,11 +35,7 @@ impl<'a> Cursor<'a, Key<'a>> for Keys<'a> {
|
||||
fn seek(&mut self) { self.state.seek_fwd(); }
|
||||
|
||||
#[inline]
|
||||
fn init(self, from: From<'a>) -> Self {
|
||||
Self {
|
||||
state: self.state.init_fwd(from),
|
||||
}
|
||||
}
|
||||
fn init(self, from: From<'a>) -> Self { Self { state: self.state.init_fwd(from) } }
|
||||
}
|
||||
|
||||
impl<'a> Stream for Keys<'a> {
|
||||
|
||||
@@ -17,18 +17,12 @@ pub(crate) struct KeysRev<'a> {
|
||||
|
||||
impl<'a> KeysRev<'a> {
|
||||
pub(crate) fn new(db: &'a Arc<Engine>, cf: &'a Arc<ColumnFamily>, opts: ReadOptions) -> Self {
|
||||
Self {
|
||||
state: State::new(db, cf, opts),
|
||||
}
|
||||
Self { state: State::new(db, cf, opts) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> convert::From<State<'a>> for KeysRev<'a> {
|
||||
fn from(state: State<'a>) -> Self {
|
||||
Self {
|
||||
state,
|
||||
}
|
||||
}
|
||||
fn from(state: State<'a>) -> Self { Self { state } }
|
||||
}
|
||||
|
||||
impl<'a> Cursor<'a, Key<'a>> for KeysRev<'a> {
|
||||
@@ -41,11 +35,7 @@ impl<'a> Cursor<'a, Key<'a>> for KeysRev<'a> {
|
||||
fn seek(&mut self) { self.state.seek_rev(); }
|
||||
|
||||
#[inline]
|
||||
fn init(self, from: From<'a>) -> Self {
|
||||
Self {
|
||||
state: self.state.init_rev(from),
|
||||
}
|
||||
}
|
||||
fn init(self, from: From<'a>) -> Self { Self { state: self.state.init_rev(from) } }
|
||||
}
|
||||
|
||||
impl<'a> Stream for KeysRev<'a> {
|
||||
|
||||
Reference in New Issue
Block a user