Skip to content

Commit ed82833

Browse files
committed
chore: satisfy clippy
Signed-off-by: Richard Zak <richard.j.zak@gmail.com>
1 parent 98ab1fa commit ed82833

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/pck/raw.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct SgxExtensionRaw<'a> {
1818
pub platform_config: Option<PlatformConfiguration>, // Only on multi-CPU "Platform" systems
1919
}
2020

21-
impl<'a> AssociatedOid for SgxExtensionRaw<'a> {
21+
impl AssociatedOid for SgxExtensionRaw<'_> {
2222
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113741.1.13.1");
2323
}
2424

@@ -30,7 +30,7 @@ pub struct PpID<'a> {
3030
pub bytes: &'a [u8],
3131
}
3232

33-
impl<'a> AssociatedOid for PpID<'a> {
33+
impl AssociatedOid for PpID<'_> {
3434
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113741.1.13.1.1");
3535
}
3636

@@ -40,7 +40,7 @@ pub struct Tcb<'a> {
4040
pub inner: TCBInner<'a>,
4141
}
4242

43-
impl<'a> AssociatedOid for Tcb<'a> {
43+
impl AssociatedOid for Tcb<'_> {
4444
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113741.1.13.1.2");
4545
}
4646

@@ -89,7 +89,7 @@ pub struct TcbCpuSvn<'a> {
8989
pub bytes: &'a [u8],
9090
}
9191

92-
impl<'a> AssociatedOid for TcbCpuSvn<'a> {
92+
impl AssociatedOid for TcbCpuSvn<'_> {
9393
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113741.1.13.1.2.18");
9494
}
9595

@@ -100,7 +100,7 @@ pub struct PceID<'a> {
100100
pub bytes: &'a [u8],
101101
}
102102

103-
impl<'a> AssociatedOid for PceID<'a> {
103+
impl AssociatedOid for PceID<'_> {
104104
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113741.1.13.1.3");
105105
}
106106

@@ -111,7 +111,7 @@ pub struct FmSpc<'a> {
111111
pub bytes: &'a [u8],
112112
}
113113

114-
impl<'a> AssociatedOid for FmSpc<'a> {
114+
impl AssociatedOid for FmSpc<'_> {
115115
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113741.1.13.1.4");
116116
}
117117

@@ -141,7 +141,7 @@ pub struct PlatformInstanceID<'a> {
141141
pub bytes: &'a [u8],
142142
}
143143

144-
impl<'a> AssociatedOid for PlatformInstanceID<'a> {
144+
impl AssociatedOid for PlatformInstanceID<'_> {
145145
const OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113741.1.13.1.6");
146146
}
147147

src/signature/author.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ mod test {
6565

6666
#[test]
6767
fn author_instantiation() {
68-
let author = Author::new(0x2000_03_30, 0u32);
68+
let author = Author::new(0x2000_0330, 0u32);
6969
assert_eq!(author.header1, Author::HEADER1);
7070
assert_eq!(author.vendor, 0u32);
71-
assert_eq!(author.date, 0x2000_03_30);
71+
assert_eq!(author.date, 0x2000_0330);
7272
assert_eq!(author.header2, Author::HEADER2);
7373
assert_eq!(author.swdefined, 0u32);
7474
assert_eq!(author.reserved, [0; 21]);

src/ssa.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ impl<T> StateSaveArea<T> {
110110
pub fn vector(&self) -> Option<Vector> {
111111
match self.gpr.exitinfo & Self::VALID {
112112
0 => None,
113-
_ => Some(unsafe { transmute(self.gpr.exitinfo as u8) }),
113+
_ => Some(unsafe {
114+
transmute::<u8, x86_64::structures::idt::ExceptionVector>(self.gpr.exitinfo as u8)
115+
}),
114116
}
115117
}
116118
}

0 commit comments

Comments
 (0)