File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ impl_assertion_set!(AssertRequest, 0.ptr);
133133
134134impl AssertRequest {
135135 /// Return a [AssertRequest]
136+ #[ allow( clippy:: new_without_default) ]
136137 pub fn new ( ) -> AssertRequest {
137138 unsafe {
138139 let assert = ffi:: fido_assert_new ( ) ;
@@ -151,6 +152,7 @@ impl_assertion_set!(AssertVerifier, 0.ptr);
151152
152153impl AssertVerifier {
153154 /// Return a [AssertVerifier] for verify.
155+ #[ allow( clippy:: new_without_default) ]
154156 pub fn new ( ) -> AssertVerifier {
155157 unsafe {
156158 let assert = ffi:: fido_assert_new ( ) ;
@@ -428,7 +430,7 @@ impl Assertions {
428430 let count = self . count ( ) ;
429431
430432 AssertionIter {
431- asserts : & self ,
433+ asserts : self ,
432434 idx : 0 ,
433435 count,
434436 }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ impl Drop for Credential {
1818
1919impl Credential {
2020 /// Create a new credential
21+ #[ allow( clippy:: new_without_default) ]
2122 pub fn new ( ) -> Self {
2223 unsafe {
2324 let cred = ffi:: fido_cred_new ( ) ;
Original file line number Diff line number Diff line change 3838//! ```rust,no_run
3939//! use fido2_rs::device::DeviceList;
4040//!
41- //! fn main() {
42- //! let list = DeviceList::list_devices(4);
43- //!
44- //! for dev in list {
45- //! println!("{:?}", dev.path);
46- //! }
41+ //! let list = DeviceList::list_devices(4);
42+ //! for dev in list {
43+ //! println!("{:?}", dev.path);
4744//! }
45+ //!
4846//! ```
4947//!
5048//! ## Make a credential
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ fn main() -> Result<()> {
5151 return Ok ( ( ) ) ;
5252 }
5353
54- if let Ok ( _ ) = env:: var ( "FIDO2_USE_PKG_CONFIG" ) {
54+ if env:: var ( "FIDO2_USE_PKG_CONFIG" ) . is_ok ( ) {
5555 find_pkg ( ) ?;
5656
5757 return Ok ( ( ) ) ;
@@ -92,7 +92,7 @@ fn main() -> Result<()> {
9292fn verify_sha256 ( content : & [ u8 ] ) -> bool {
9393 let sha256 = Sha256 :: digest ( content) ;
9494
95- & * sha256 == hex:: decode ( SHA256 ) . unwrap ( )
95+ * sha256 == hex:: decode ( SHA256 ) . unwrap ( )
9696}
9797
9898/// for windows and msvc, use pre-build
You can’t perform that action at this time.
0 commit comments