Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ WORKSPACE.bazel
bazel-*

# Emacs backups
*~
*~
4 changes: 2 additions & 2 deletions insta/src/redaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub enum Redaction {
/// Static redaction with new content.
Static(Content),
/// Redaction with new content.
Dynamic(Box<dyn Fn(Content, ContentPath<'_>) -> Content + Sync + Send>),
Dynamic(Box<dyn Fn(Content, ContentPath<'_>) -> Content>),
}

macro_rules! impl_from {
Expand Down Expand Up @@ -127,7 +127,7 @@ impl<'a> From<&'a [u8]> for Redaction {
pub fn dynamic_redaction<I, F>(func: F) -> Redaction
where
I: Into<Content>,
F: Fn(Content, ContentPath<'_>) -> I + Send + Sync + 'static,
F: Fn(Content, ContentPath<'_>) -> I + 'static,
{
Redaction::Dynamic(Box::new(move |c, p| func(c, p).into()))
}
Expand Down
2 changes: 1 addition & 1 deletion insta/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ impl Settings {
pub fn add_dynamic_redaction<I, F>(&mut self, selector: &str, func: F)
where
I: Into<Content>,
F: Fn(Content, ContentPath<'_>) -> I + Send + Sync + 'static,
F: Fn(Content, ContentPath<'_>) -> I + 'static,
{
self.add_redaction(selector, dynamic_redaction(func));
}
Expand Down