Skip to content

Commit

Permalink
chore: avoid clippy errors
Browse files Browse the repository at this point in the history
- Allow `elided-named-lifetimes` lint warning until a final fix.
- Elide explicit lifetimes pointed out by clippy.

Signed-off-by: Miguel Martín <[email protected]>
  • Loading branch information
mmartinv committed Nov 29, 2024
1 parent 69159fa commit 4e54988
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 21 deletions.
15 changes: 2 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-linuxapp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ async fn main() -> Result<()> {
Command::new("systemctl")
.arg("reboot")
.spawn()
.expect("Reboot failed");
.expect("Reboot failed").wait()?;
}
Ok(())
}
1 change: 1 addition & 0 deletions client-linuxapp/src/serviceinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ fn create_user_with_password(user: &str, password: &str) -> Result<()> {
log::info!("Checking for password encryption");
if !is_password_encrypted(password) {
log::info!("Encrypting password");
#[allow(clippy::zombie_processes)]
let echo = Command::new("echo")
.arg(password)
.stdout(Stdio::piped())
Expand Down
2 changes: 1 addition & 1 deletion data-formats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ thiserror = "1"
aws-nitro-enclaves-cose = { path = "../external/aws-nitro-enclaves-cose"}
uuid = "1.3"
num-traits = "0.2"
num-derive = "0.3"
num-derive = "0.4"
paste = "1.0"
pem = "3.0"
tss-esapi = { version = "7.4", features = ["generate-bindings"] }
Expand Down
2 changes: 1 addition & 1 deletion data-formats/src/constants/serviceinfo_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ impl<'de> serde::Deserialize<'de> for ServiceInfoModule {
D: serde::de::Deserializer<'de>,
{
struct SIMVisitor;
impl<'de> serde::de::Visitor<'de> for SIMVisitor {
impl serde::de::Visitor<'_> for SIMVisitor {
type Value = ServiceInfoModule;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
5 changes: 3 additions & 2 deletions data-formats/src/ownershipvoucher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ impl OwnershipVoucher {
}

impl<'a> OwnershipVoucher {
#[allow(elided_named_lifetimes)]
pub fn iter_entries(&'a self) -> Result<EntryIter> {
Ok(EntryIter {
voucher: self,
Expand All @@ -347,7 +348,7 @@ pub struct EntryIter<'a> {
last_pubkey: PublicKey,
}

impl<'a> Iterator for EntryIter<'a> {
impl Iterator for EntryIter<'_> {
type Item = Result<OwnershipVoucherEntryPayload>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -378,7 +379,7 @@ impl<'a> Iterator for EntryIter<'a> {
}
}

impl<'a> EntryIter<'a> {
impl EntryIter<'_> {
fn process_element(
&mut self,
entry: OwnershipVoucherEntry,
Expand Down
6 changes: 3 additions & 3 deletions data-formats/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl<'de> Deserialize<'de> for IPAddress {
{
struct IPAddressVisitor;

impl<'de> serde::de::Visitor<'de> for IPAddressVisitor {
impl serde::de::Visitor<'_> for IPAddressVisitor {
type Value = IPAddress;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down Expand Up @@ -1304,7 +1304,7 @@ impl<'de> Deserialize<'de> for KexSuite {
{
struct KexSuiteVisitor;

impl<'de> serde::de::Visitor<'de> for KexSuiteVisitor {
impl serde::de::Visitor<'_> for KexSuiteVisitor {
type Value = KexSuite;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down Expand Up @@ -1964,7 +1964,7 @@ impl<'de> Deserialize<'de> for RemoteTransport {
{
struct RemoteTransportVisitor;

impl<'de> serde::de::Visitor<'de> for RemoteTransportVisitor {
impl serde::de::Visitor<'_> for RemoteTransportVisitor {
type Value = RemoteTransport;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down

0 comments on commit 4e54988

Please sign in to comment.