Skip to content

Commit

Permalink
make the newest clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp15b committed Dec 9, 2024
1 parent b79ed9c commit ce5277f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/vc/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ pub(super) fn explain_proc_call(
builder: &ExprBuilder,
) -> Expr {
let decl = decl_ref.borrow();
return builder.subst(
builder.subst(
fold_spec(&decl, decl.requires()),
decl.inputs
.node
.iter()
.zip(args)
.map(|(param, arg)| (param.name, arg.clone())),
);
)
}

/// Fold a list of specification parts (either requires or ensures) into a
Expand Down
2 changes: 1 addition & 1 deletion website/blog/2023-10-27-oopsla23-distinguished-artifact.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Distinguished Artifact at OOPSLA '23
title: Distinguished Artifact at OOPSLA '23
authors: phisch
tags: [publications]
---
Expand Down
2 changes: 1 addition & 1 deletion z3rro/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl<'ctx> InstrumentedModel<'ctx> {

/// The [`Display`] implementation simply defers to the underlying
/// [`z3::Model`]'s implementation.
impl<'ctx> Display for InstrumentedModel<'ctx> {
impl Display for InstrumentedModel<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_fmt(format_args!("{}", &self.model))
}
Expand Down
2 changes: 1 addition & 1 deletion z3rro/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub enum ProveResult<'ctx> {
Unknown(ReasonUnknown),
}

impl<'ctx> Display for ProveResult<'ctx> {
impl Display for ProveResult<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ProveResult::Proof => f.write_str("Proof"),
Expand Down
2 changes: 1 addition & 1 deletion z3rro/src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<'ctx> SmtScope<'ctx> {
/// Restricted interface to [`SmtScope`] provided to [`SmtFresh::allocate`].
pub struct SmtAlloc<'ctx, 'a>(&'a mut SmtScope<'ctx>);

impl<'ctx, 'a> SmtAlloc<'ctx, 'a> {
impl<'ctx> SmtAlloc<'ctx, '_> {
/// Register a new variable in this allocator.
pub fn register_var(&mut self, bound: &impl Ast<'ctx>) {
self.0.add_bound(bound);
Expand Down
6 changes: 3 additions & 3 deletions z3rro/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<'a, W> PrefixWriter<'a, W> {
}
}

impl<'a, W: std::io::Write> std::io::Write for PrefixWriter<'a, W> {
impl<W: std::io::Write> std::io::Write for PrefixWriter<'_, W> {
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
for line in buf.split_inclusive(|c| *c == b'\n') {
if self.line_start {
Expand Down Expand Up @@ -162,11 +162,11 @@ pub fn set_solver_timeout(solver: &Solver, duration: Duration) {
#[derive(Debug)]
pub struct PrettyRational<'a>(pub Cow<'a, BigRational>);

impl<'a> PrettyRational<'a> {
impl PrettyRational<'_> {
const DECIMAL_EXPANSION_LIMIT: usize = 5;
}

impl<'a> Display for PrettyRational<'a> {
impl Display for PrettyRational<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
if self.0.is_negative() {
write!(f, "-")?;
Expand Down

0 comments on commit ce5277f

Please sign in to comment.