Skip to content

Commit 2890305

Browse files
committed
Fix type_complexity error
1 parent fef6d87 commit 2890305

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

download/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ fn download_with_backend(
4747
}
4848
}
4949

50+
type EventResult<'a> = &'a dyn Fn(Event<'_>) -> Result<()>;
5051
pub fn download_to_path_with_backend(
5152
backend: Backend,
5253
url: &Url,
5354
path: &Path,
5455
resume_from_partial: bool,
55-
callback: Option<&dyn Fn(Event<'_>) -> Result<()>>,
56+
callback: Option<EventResult<'_>>,
5657
) -> Result<()> {
5758
use std::cell::RefCell;
5859
use std::fs::remove_file;

0 commit comments

Comments
 (0)