Skip to content

Commit 34845d1

Browse files
committed
cleanup: get clippy clean
Also use a workspace for `xtask`. Signed-off-by: Dan Cross <[email protected]>
1 parent b9f6958 commit 34845d1

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
workspace = { members = [ "xtask" ] }
2+
13
[package]
24
name = "amd-apcb"
35
version = "0.5.1"

src/apcb.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub struct SerdeApcb {
120120
}
121121

122122
#[cfg(feature = "schemars")]
123-
impl<'a> schemars::JsonSchema for Apcb<'a> {
123+
impl schemars::JsonSchema for Apcb<'_> {
124124
fn schema_name() -> std::string::String {
125125
SerdeApcb::schema_name()
126126
}
@@ -135,7 +135,7 @@ impl<'a> schemars::JsonSchema for Apcb<'a> {
135135
}
136136

137137
#[cfg(feature = "serde")]
138-
impl<'a> Apcb<'a> {
138+
impl Apcb<'_> {
139139
pub fn context(&self) -> ApcbContext {
140140
self.context
141141
}
@@ -197,7 +197,7 @@ impl<'a> Apcb<'a> {
197197
}
198198

199199
#[cfg(feature = "serde")]
200-
impl<'a> Serialize for Apcb<'a> {
200+
impl Serialize for Apcb<'_> {
201201
fn serialize<S>(
202202
&self,
203203
serializer: S,

src/entry.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ impl<'a, T: EntryCompatible + MutSequenceElementFromBytes<'a>>
173173
}
174174
}
175175

176-
impl<'a, 'b, T: EntryCompatible + MutSequenceElementFromBytes<'b>>
177-
StructSequenceEntryMutIter<'a, T>
176+
impl<'b, T: EntryCompatible + MutSequenceElementFromBytes<'b>>
177+
StructSequenceEntryMutIter<'_, T>
178178
{
179179
pub(crate) fn validate(mut self) -> Result<()> {
180180
while !self.buf.is_empty() {
@@ -438,7 +438,7 @@ pub struct SerdeEntryItem {
438438
}
439439

440440
#[cfg(feature = "schemars")]
441-
impl<'a> schemars::JsonSchema for EntryItem<'a> {
441+
impl schemars::JsonSchema for EntryItem<'_> {
442442
fn schema_name() -> std::string::String {
443443
String::from("EntryItem")
444444
}
@@ -631,7 +631,7 @@ impl schemars::JsonSchema for SerdeEntryItem {
631631
}
632632

633633
#[cfg(feature = "serde")]
634-
impl<'a> Serialize for EntryItem<'a> {
634+
impl Serialize for EntryItem<'_> {
635635
fn serialize<S>(
636636
&self,
637637
serializer: S,
@@ -1031,7 +1031,7 @@ impl<'de> Deserialize<'de> for SerdeEntryItem {
10311031
{
10321032
struct FieldVisitor;
10331033

1034-
impl<'de> Visitor<'de> for FieldVisitor {
1034+
impl Visitor<'_> for FieldVisitor {
10351035
type Value = Field;
10361036

10371037
fn expecting(

src/group.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub struct SerdeGroupItem {
4444
}
4545

4646
#[cfg(feature = "schemars")]
47-
impl<'a> schemars::JsonSchema for GroupItem<'a> {
47+
impl schemars::JsonSchema for GroupItem<'_> {
4848
fn schema_name() -> std::string::String {
4949
SerdeGroupItem::schema_name()
5050
}
@@ -249,7 +249,7 @@ pub struct GroupMutIter<'a> {
249249
remaining_used_size: usize,
250250
}
251251

252-
impl<'a> GroupMutIter<'a> {
252+
impl GroupMutIter<'_> {
253253
/// It's useful to have some way of NOT mutating self.buf. This is what
254254
/// this function does. Note: The caller needs to manually decrease
255255
/// remaining_used_size for each call if desired.
@@ -503,7 +503,7 @@ pub struct GroupMutItem<'a> {
503503
pub(crate) used_size: usize,
504504
}
505505

506-
impl<'a> GroupMutItem<'a> {
506+
impl GroupMutItem<'_> {
507507
/// Note: ASCII
508508
pub fn signature(&self) -> [u8; 4] {
509509
self.header.signature

src/ondisk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8848,7 +8848,7 @@ impl<'de> serde::Deserialize<'de> for FchConsoleOutMode {
88488848
deserializer: D,
88498849
) -> std::result::Result<Self, D::Error> {
88508850
struct ModeVisitor;
8851-
impl<'de> serde::de::Visitor<'de> for ModeVisitor {
8851+
impl serde::de::Visitor<'_> for ModeVisitor {
88528852
type Value = FchConsoleOutMode;
88538853
fn expecting(
88548854
&self,
@@ -11676,7 +11676,7 @@ make_token_accessors! {
1167611676

1167711677
// Compatibility shim for old token accessors (which we have a lot of
1167811678
// configurations with)
11679-
impl<'a, 'b> Tokens<'a, 'b> {
11679+
impl Tokens<'_, '_> {
1168011680
#[allow(non_snake_case)]
1168111681
pub fn mem_limit_memory_to_below_1_TiB(&self) -> Result<bool> {
1168211682
bool::from_u32(self.get(TokenEntryId::Bool, 0x5e71e6d8)?)
@@ -11723,7 +11723,7 @@ impl<'a, 'b> Tokens<'a, 'b> {
1172311723

1172411724
// Compatibility shim for old token accessors (which we have a lot of
1172511725
// configurations with)
11726-
impl<'a, 'b> TokensMut<'a, 'b> {
11726+
impl TokensMut<'_, '_> {
1172711727
#[allow(non_snake_case)]
1172811728
pub fn mem_limit_memory_to_below_1_TiB(&self) -> Result<bool> {
1172911729
bool::from_u32(self.get(TokenEntryId::Bool, 0x5e71e6d8)?)

0 commit comments

Comments
 (0)