Skip to content

Commit

Permalink
Clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam committed Jan 29, 2024
1 parent fac45b6 commit 96d4b12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library/kani_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pub fn modifies(attr: TokenStream, item: TokenStream) -> TokenStream {

/// This module implements Kani attributes in a way that only Kani's compiler can understand.
/// This code should only be activated when pre-building Kani's sysroot.
//#[cfg(kani_sysroot)]
#[cfg(kani_sysroot)]
mod sysroot {
use proc_macro_error::{abort, abort_call_site};

Expand Down
8 changes: 4 additions & 4 deletions library/kani_macros/src/sysroot/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,9 @@ fn is_replace_return_havoc(stmt: &syn::Stmt) -> bool {
/// For each argument create an expression that passes this argument along unmodified.
///
/// Reconstructs structs that may have been deconstructed with patterns.
fn exprs_for_args<'a, T>(
args: &'a syn::punctuated::Punctuated<FnArg, T>,
) -> impl Iterator<Item = Expr> + Clone + 'a {
fn exprs_for_args<T>(
args: &syn::punctuated::Punctuated<FnArg, T>,
) -> impl Iterator<Item = Expr> + Clone + '_ {
args.iter().map(|arg| match arg {
FnArg::Receiver(_) => Expr::Verbatim(quote!(self)),
FnArg::Typed(typed) => pat_to_expr(&typed.pat),
Expand Down Expand Up @@ -1351,7 +1351,7 @@ fn chunks_by<'a, T, C: Default + Extend<T>>(
std::iter::from_fn(move || {
let mut new = C::default();
let mut empty = true;
while let Some(tok) = iter.next() {
for tok in iter.by_ref() {
empty = false;
if pred(&tok) {
break;
Expand Down

0 comments on commit 96d4b12

Please sign in to comment.