File tree Expand file tree Collapse file tree 5 files changed +6
-31
lines changed Expand file tree Collapse file tree 5 files changed +6
-31
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ authors = ["SpiderOak, Inc."]
15
15
edition = " 2021"
16
16
license = " UNLICENSED"
17
17
publish = false
18
- rust-version = " 1.76 "
18
+ rust-version = " 1.77 "
19
19
20
20
[workspace .lints .rust ]
21
21
# missing_docs = "warn"
Original file line number Diff line number Diff line change @@ -285,27 +285,3 @@ impl TryFrom<Value> for Label {
285
285
) )
286
286
}
287
287
}
288
-
289
- /// For `optional int` in policy.
290
- pub ( crate ) struct OptionalLabel ( Option < Label > ) ;
291
-
292
- impl OptionalLabel {
293
- const fn none ( ) -> Self {
294
- Self ( None )
295
- }
296
-
297
- const fn some ( label : Label ) -> Self {
298
- Self ( Some ( label) )
299
- }
300
- }
301
-
302
- impl TryFrom < Value > for OptionalLabel {
303
- type Error = MachineErrorType ;
304
-
305
- fn try_from ( value : Value ) -> Result < Self , Self :: Error > {
306
- match value {
307
- Value :: None => Ok ( OptionalLabel :: none ( ) ) ,
308
- v => Ok ( OptionalLabel :: some ( v. try_into ( ) ?) ) ,
309
- }
310
- }
311
- }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use serde::{Deserialize, Serialize};
19
19
20
20
/// An error returned by [`Hsm`].
21
21
#[ derive( Debug ) ]
22
- pub ( crate ) enum HsmError {
22
+ pub enum HsmError {
23
23
/// Unable to authenticate the wrapped key.
24
24
Authentication ,
25
25
/// The key was not found.
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ fn init() {
164
164
}
165
165
166
166
thread_local ! {
167
- static RECORDER : RefCell <Option <Recorder >> = RefCell :: new( None ) ;
167
+ static RECORDER : RefCell <Option <Recorder >> = const { RefCell :: new( None ) } ;
168
168
}
169
169
170
170
/// Records the result of the test.
@@ -253,9 +253,7 @@ enum Needle<'a> {
253
253
#[ derive( Debug ) ]
254
254
enum Match < ' a > {
255
255
/// Did not find a match.
256
- ///
257
- /// It returns the haystack.
258
- None ( & ' a str ) ,
256
+ None ,
259
257
/// Found a prefix match ([`Needle::Prefix`]).
260
258
Prefix { prefix : & ' a str , suffix : & ' a str } ,
261
259
/// Found a complete match ([`Needle::Complete`]).
@@ -280,7 +278,7 @@ where
280
278
_ => continue ,
281
279
}
282
280
}
283
- Match :: None ( haystack )
281
+ Match :: None
284
282
}
285
283
286
284
struct Recorder {
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ impl Display for TestRule {
109
109
}
110
110
111
111
#[ derive( Debug ) ]
112
+ #[ allow( dead_code) ] // fields used only via `Debug`
112
113
enum TestError {
113
114
Storage ( StorageError ) ,
114
115
Client ( ClientError ) ,
You can’t perform that action at this time.
0 commit comments