Skip to content

Commit 6017325

Browse files
committed
Simplify syntax_violation_callback signature
1 parent 37e21d6 commit 6017325

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ impl<'a> ParseOptions<'a> {
245245
/// # }
246246
/// # run().unwrap();
247247
/// ```
248-
pub fn syntax_violation_callback<F>(mut self, new: Option<&'a F>) -> Self
249-
where F: Fn(SyntaxViolation) + 'a
250-
{
248+
pub fn syntax_violation_callback(mut self, new: Option<&'a Fn(SyntaxViolation)>) -> Self {
251249
self.violation_fn = match new {
252250
Some(f) => ViolationFn::NewFn(f),
253251
None => ViolationFn::NoOp

0 commit comments

Comments
 (0)