File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ impl Cache {
72
72
/// // Use other methods for configuration
73
73
/// ```
74
74
#[ inline]
75
+ #[ allow( clippy:: new_ret_no_self) ]
75
76
pub fn new < P : AsRef < path:: Path > > ( path : P ) -> crate :: CacheBuilder {
76
77
crate :: CacheBuilder :: new ( path)
77
78
}
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ impl Metadata {
119
119
#[ inline]
120
120
pub fn check_integrity_of ( & self , data : & [ u8 ] ) -> bool {
121
121
let other_integrity: Md5Bytes = md5:: compute ( data) . into ( ) ;
122
- & other_integrity == & self . integrity
122
+ other_integrity == self . integrity
123
123
}
124
124
}
125
125
@@ -135,8 +135,8 @@ impl MetaDb {
135
135
pub fn get_metadata ( & self , key : & [ u8 ] ) -> Result < Metadata > {
136
136
let data = match self . db . get ( key) {
137
137
Ok ( Some ( data) ) => data,
138
- Ok ( None ) => Err ( ForcepError :: NotFound ) ? ,
139
- Err ( e) => Err ( ForcepError :: MetaDb ( e) ) ? ,
138
+ Ok ( None ) => return Err ( ForcepError :: NotFound ) ,
139
+ Err ( e) => return Err ( ForcepError :: MetaDb ( e) ) ,
140
140
} ;
141
141
Metadata :: deserialize ( & data)
142
142
}
You can’t perform that action at this time.
0 commit comments