We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
type_complexity
1 parent fef6d87 commit 2890305Copy full SHA for 2890305
download/src/lib.rs
@@ -47,12 +47,13 @@ fn download_with_backend(
47
}
48
49
50
+type EventResult<'a> = &'a dyn Fn(Event<'_>) -> Result<()>;
51
pub fn download_to_path_with_backend(
52
backend: Backend,
53
url: &Url,
54
path: &Path,
55
resume_from_partial: bool,
- callback: Option<&dyn Fn(Event<'_>) -> Result<()>>,
56
+ callback: Option<EventResult<'_>>,
57
) -> Result<()> {
58
use std::cell::RefCell;
59
use std::fs::remove_file;
0 commit comments