File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ impl AsRef<Value> for PossumValue {
11
11
fn as_ref ( & self ) -> & Value {
12
12
match self {
13
13
Self :: ReaderValue ( value) => value,
14
- Self :: SnapshotValue ( sv) => * & sv,
14
+ Self :: SnapshotValue ( sv) => sv,
15
15
}
16
16
}
17
17
}
@@ -22,7 +22,7 @@ impl Deref for PossumValue {
22
22
fn deref ( & self ) -> & Self :: Target {
23
23
match self {
24
24
Self :: ReaderValue ( value) => value,
25
- Self :: SnapshotValue ( sv) => * & sv,
25
+ Self :: SnapshotValue ( sv) => sv,
26
26
}
27
27
}
28
28
}
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ impl BeginWriteValue<'_, '_> {
151
151
// Need to rewind the file since we're cloning the whole thing.
152
152
file. seek ( Start ( 0 ) ) ?;
153
153
value_writer. copy_from ( file) ?;
154
- return Ok ( value_writer) ;
154
+ Ok ( value_writer)
155
155
}
156
156
157
157
/// Assign an exclusive file for writing a value.
Original file line number Diff line number Diff line change @@ -260,14 +260,15 @@ impl<'h> Transaction<'h> {
260
260
}
261
261
262
262
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 (
264
264
"update keys set key=? where key=? returning last_used" ,
265
265
[ to, from] ,
266
266
|row| {
267
267
let ts: Timestamp = row. get ( 0 ) ?;
268
268
Ok ( ts)
269
269
} ,
270
- ) {
270
+ ) ;
271
+ let last_used = match row_result {
271
272
Err ( QueryReturnedNoRows ) => Err ( Error :: NoSuchKey ) ,
272
273
Ok ( ok) => Ok ( ok) ,
273
274
Err ( err) => Err ( err. into ( ) ) ,
You can’t perform that action at this time.
0 commit comments