Skip to content

Commit 67036ba

Browse files
authored
Merge pull request #366 from Superhepper/main
Fixes errors reported by linter in rust 1.63.
2 parents 0efff64 + 6fef467 commit 67036ba

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

tss-esapi/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub type Result<T> = std::result::Result<T, Error>;
1515
/// Main error type used by the crate to return issues with a method call. The value can either be
1616
/// a TSS-generated response code or a wrapper error - marking an issue caught within the wrapping
1717
/// layer.
18-
#[derive(Copy, Clone, PartialEq, Debug)]
18+
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1919
pub enum Error {
2020
WrapperError(WrapperErrorKind),
2121
TssError(ReturnCode),

tss-esapi/src/error/return_code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub use tpm::{
2929

3030
/// Enum representing return codes and response codes
3131
/// from the TSS and the TPM that indicates an error.
32-
#[derive(Debug, Copy, Clone, PartialEq)]
32+
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
3333
pub enum ReturnCode {
3434
Tpm(TpmResponseCode),
3535
Fapi(FapiReturnCode),

tss-esapi/src/error/return_code/tpm/format_zero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl std::fmt::Display for TpmFormatZeroResponseCode {
9191
}
9292

9393
bitfield! {
94-
#[derive(PartialEq, Copy, Clone)]
94+
#[derive(Copy, Clone, PartialEq, Eq)]
9595
pub struct FormatZeroResponseCodeStructure(u16);
9696
impl Debug;
9797
u8, error_number, set_error_number: 6, 0;

tss-esapi/src/error/wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 Contributors to the Parsec project.
22
// SPDX-License-Identifier: Apache-2.0
33
/// List of error types that might occur in the wrapper.
4-
#[derive(Copy, Clone, PartialEq, Debug)]
4+
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
55
#[non_exhaustive]
66
pub enum WrapperErrorKind {
77
/// Returned when a size or length-defined parameter does not conform with the size

tss-esapi/src/structures/lists/ecc_curves.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::ops::Deref;
1111
///
1212
/// # Details
1313
/// This corresponds to `TPML_ECC_CURVE`.
14-
#[derive(Debug, Clone, Default, PartialEq)]
14+
#[derive(Debug, Clone, Default, PartialEq, Eq)]
1515
pub struct EccCurveList {
1616
ecc_curves: Vec<EccCurveIdentifier>,
1717
}

tss-esapi/src/structures/lists/handles.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::ops::Deref;
1111
///
1212
/// # Details
1313
/// This corresponds to `TPML_HANDLE`.
14-
#[derive(Debug, Clone, Default, PartialEq)]
14+
#[derive(Debug, Clone, Default, PartialEq, Eq)]
1515
pub struct HandleList {
1616
handles: Vec<TpmHandle>,
1717
}

tss-esapi/src/tcti_ldr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl Drop for TctiInfo {
125125

126126
/// Placeholder TCTI types that can be used when initialising a `Context` to determine which
127127
/// interface will be used to communicate with the TPM.
128-
#[derive(Clone, Debug, PartialEq)]
128+
#[derive(Clone, Debug, PartialEq, Eq)]
129129
pub enum TctiNameConf {
130130
/// Connect to a TPM available as a device node on the system
131131
///
@@ -313,7 +313,7 @@ fn validate_from_str_tcti() {
313313
///
314314
/// The default configuration uses the library default of
315315
/// `/dev/tpm0`.
316-
#[derive(Clone, Debug, PartialEq)]
316+
#[derive(Clone, Debug, PartialEq, Eq)]
317317
pub struct DeviceConfig {
318318
/// Path to the device node to connect to
319319
///
@@ -355,7 +355,7 @@ fn validate_from_str_device_config() {
355355
/// Configuration for an Mssim TCTI context
356356
///
357357
/// The default configuration will point to `localhost:2321`
358-
#[derive(Clone, Debug, PartialEq)]
358+
#[derive(Clone, Debug, PartialEq, Eq)]
359359
pub struct NetworkTPMConfig {
360360
/// Address of the server to connect to
361361
///
@@ -455,7 +455,7 @@ fn validate_from_str_networktpm_config() {
455455
/// Address of a TPM server
456456
///
457457
/// The default value is `localhost`
458-
#[derive(Clone, Debug, PartialEq)]
458+
#[derive(Clone, Debug, PartialEq, Eq)]
459459
pub enum ServerAddress {
460460
/// IPv4 or IPv6 address
461461
Ip(IpAddr),
@@ -498,7 +498,7 @@ impl Default for ServerAddress {
498498
}
499499

500500
/// Configuration for a TABRMD TCTI context
501-
#[derive(Clone, Debug, PartialEq)]
501+
#[derive(Clone, Debug, PartialEq, Eq)]
502502
pub struct TabrmdConfig {
503503
/// Bus name to be used by TABRMD
504504
///
@@ -555,7 +555,7 @@ impl FromStr for TabrmdConfig {
555555
}
556556

557557
/// DBus type for usage with TABRMD
558-
#[derive(Copy, Clone, Debug, PartialEq)]
558+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
559559
pub enum BusType {
560560
System,
561561
Session,

0 commit comments

Comments
 (0)