apply new rustfmt.toml changes, fix some clippy lints

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-15 00:05:47 -05:00
parent 0317cc8cc5
commit 77e0b76408
No known key found for this signature in database
296 changed files with 7147 additions and 4300 deletions

View file

@ -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> {

View file

@ -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> {

View file

@ -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> {

View file

@ -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> {