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."]
1515edition = " 2021"
1616license = " UNLICENSED"
1717publish = false
18- rust-version = " 1.76 "
18+ rust-version = " 1.77 "
1919
2020[workspace .lints .rust ]
2121# missing_docs = "warn"
Original file line number Diff line number Diff line change @@ -285,27 +285,3 @@ impl TryFrom<Value> for Label {
285285 ) )
286286 }
287287}
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};
1919
2020/// An error returned by [`Hsm`].
2121#[ derive( Debug ) ]
22- pub ( crate ) enum HsmError {
22+ pub enum HsmError {
2323 /// Unable to authenticate the wrapped key.
2424 Authentication ,
2525 /// The key was not found.
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ fn init() {
164164}
165165
166166thread_local ! {
167- static RECORDER : RefCell <Option <Recorder >> = RefCell :: new( None ) ;
167+ static RECORDER : RefCell <Option <Recorder >> = const { RefCell :: new( None ) } ;
168168}
169169
170170/// Records the result of the test.
@@ -253,9 +253,7 @@ enum Needle<'a> {
253253#[ derive( Debug ) ]
254254enum Match < ' a > {
255255 /// Did not find a match.
256- ///
257- /// It returns the haystack.
258- None ( & ' a str ) ,
256+ None ,
259257 /// Found a prefix match ([`Needle::Prefix`]).
260258 Prefix { prefix : & ' a str , suffix : & ' a str } ,
261259 /// Found a complete match ([`Needle::Complete`]).
@@ -280,7 +278,7 @@ where
280278 _ => continue ,
281279 }
282280 }
283- Match :: None ( haystack )
281+ Match :: None
284282}
285283
286284struct Recorder {
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ impl Display for TestRule {
109109}
110110
111111#[ derive( Debug ) ]
112+ #[ allow( dead_code) ] // fields used only via `Debug`
112113enum TestError {
113114 Storage ( StorageError ) ,
114115 Client ( ClientError ) ,
You can’t perform that action at this time.
0 commit comments