mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 13:00:36 -05:00
ok we're going well
This commit is contained in:
parent
deb26e295d
commit
8797417318
1 changed files with 7 additions and 5 deletions
|
@ -79,14 +79,16 @@ impl Debug for ConditionsFromResolutionMode {
|
|||
impl ConditionsFromResolutionMode {
|
||||
pub fn new(
|
||||
func: Option<
|
||||
impl Fn(ResolutionMode) -> &'static [&'static str] + Send + Sync + 'static,
|
||||
Box<
|
||||
dyn Fn(ResolutionMode) -> &'static [&'static str]
|
||||
+ Send
|
||||
+ Sync
|
||||
+ 'static,
|
||||
>,
|
||||
>,
|
||||
) -> Self {
|
||||
Self {
|
||||
func: match func {
|
||||
Some(func) => Box::new(func),
|
||||
None => Box::new(deno_conditions_from_resolution_mode),
|
||||
},
|
||||
func: func.unwrap_or(Box::new(deno_conditions_from_resolution_mode)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue