Skip to content

Commit 0e846ec

Browse files
committed
clippy
1 parent 51d674d commit 0e846ec

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/c_api/types/value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl AsRef<Value> for PossumValue {
1111
fn as_ref(&self) -> &Value {
1212
match self {
1313
Self::ReaderValue(value) => value,
14-
Self::SnapshotValue(sv) => *&sv,
14+
Self::SnapshotValue(sv) => sv,
1515
}
1616
}
1717
}
@@ -22,7 +22,7 @@ impl Deref for PossumValue {
2222
fn deref(&self) -> &Self::Target {
2323
match self {
2424
Self::ReaderValue(value) => value,
25-
Self::SnapshotValue(sv) => *&sv,
25+
Self::SnapshotValue(sv) => sv,
2626
}
2727
}
2828
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl BeginWriteValue<'_, '_> {
151151
// Need to rewind the file since we're cloning the whole thing.
152152
file.seek(Start(0))?;
153153
value_writer.copy_from(file)?;
154-
return Ok(value_writer);
154+
Ok(value_writer)
155155
}
156156

157157
/// Assign an exclusive file for writing a value.

src/tx.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,15 @@ impl<'h> Transaction<'h> {
260260
}
261261

262262
pub fn rename_item(&mut self, from: &[u8], to: &[u8]) -> PubResult<Timestamp> {
263-
let last_used = match self.tx.query_row(
263+
let row_result = self.tx.query_row(
264264
"update keys set key=? where key=? returning last_used",
265265
[to, from],
266266
|row| {
267267
let ts: Timestamp = row.get(0)?;
268268
Ok(ts)
269269
},
270-
) {
270+
);
271+
let last_used = match row_result {
271272
Err(QueryReturnedNoRows) => Err(Error::NoSuchKey),
272273
Ok(ok) => Ok(ok),
273274
Err(err) => Err(err.into()),

0 commit comments

Comments
 (0)