Skip to content

Commit

Permalink
fix: Ignare lint warnings in capnproto generated code (#1728)
Browse files Browse the repository at this point in the history
Fixes #1727
  • Loading branch information
aborgna-q authored Nov 28, 2024
1 parent bcac68d commit 163b211
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions hugr-model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//! are not designed for efficient traversal or modification, but for simplicity and serialization.
pub mod v0;

#[allow(clippy::needless_lifetimes)]
pub(crate) mod hugr_v0_capnp {
include!(concat!(env!("OUT_DIR"), "/hugr_v0_capnp.rs"));
}
4 changes: 2 additions & 2 deletions hugr-model/src/v0/text/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ impl<'p, 'a: 'p> PrintContext<'p, 'a> {
let term_data = self
.module
.get_term(term_id)
.ok_or_else(|| PrintError::TermNotFound(term_id))?;
.ok_or(PrintError::TermNotFound(term_id))?;

if let Term::List { parts } = term_data {
for part in *parts {
Expand All @@ -611,7 +611,7 @@ impl<'p, 'a: 'p> PrintContext<'p, 'a> {
let term_data = self
.module
.get_term(term_id)
.ok_or_else(|| PrintError::TermNotFound(term_id))?;
.ok_or(PrintError::TermNotFound(term_id))?;

if let Term::ExtSet { parts } = term_data {
for part in *parts {
Expand Down

0 comments on commit 163b211

Please sign in to comment.