Skip to content

Commit

Permalink
Use impl Trait instead of a generic type argument
Browse files Browse the repository at this point in the history
  • Loading branch information
teiesti authored and ZachJHansen committed Dec 1, 2023
1 parent d7d352a commit cb25ed4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/convenience/apply/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
use crate::syntax_tree::fol::Formula;

pub trait Apply {
fn apply<F>(self, f: &mut F) -> Self
fn apply(self, f: &mut impl FnMut(Self) -> Self) -> Self
where
F: FnMut(Self) -> Self,
Self: Sized;
}

impl Apply for Formula {
fn apply<F>(self, f: &mut F) -> Self
fn apply(self, f: &mut impl FnMut(Self) -> Self) -> Self
where
F: FnMut(Self) -> Self,
Self: Sized,
{
let inner = match self {
Expand Down

0 comments on commit cb25ed4

Please sign in to comment.