1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

refactor: simplify FetchFuture (#12185)

No need for static lifetime
This commit is contained in:
Ryan Dahl 2021-09-22 15:35:07 -04:00 committed by GitHub
parent 6decc4dd38
commit 18fff69946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,13 +24,8 @@ use std::pin::Pin;
use std::sync::Arc;
pub type DependencyMap = HashMap<String, Dependency>;
pub type FetchFuture = Pin<
Box<
(dyn Future<Output = Result<CachedModule, (ModuleSpecifier, AnyError)>>
+ 'static
+ Send),
>,
>;
type FetchFutureOutput = Result<CachedModule, (ModuleSpecifier, AnyError)>;
pub type FetchFuture = Pin<Box<dyn Future<Output = FetchFutureOutput> + Send>>;
/// A group of errors that represent errors that can occur with an
/// an implementation of `SpecifierHandler`.