Skip to content

Commit

Permalink
refactor: simplify FetchFuture (denoland#12185)
Browse files Browse the repository at this point in the history
No need for static lifetime
  • Loading branch information
ry committed Sep 22, 2021
1 parent 6decc4d commit 18fff69
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cli/specifier_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 18fff69

Please sign in to comment.