Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Jun 5, 2019
1 parent 3cac1b0 commit 439d4d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ fn fetch_or_info_command(
js_check(result);
Ok(())
})
}).map_err(|err| print_err_and_exit(err))
}).map_err(print_err_and_exit)
});
tokio_util::run(main_future);
}
Expand Down Expand Up @@ -297,7 +297,7 @@ fn run_script(flags: DenoFlags, argv: Vec<String>) {
js_check(result);
Ok(())
})
}).map_err(|err| print_err_and_exit(err))
}).map_err(print_err_and_exit)
});
tokio_util::run(main_future);
}
Expand Down
5 changes: 2 additions & 3 deletions cli/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,12 @@ impl Worker {
}).map_err(move |err| {
worker_.state.progress.done();
// Convert to RustOrJsError AND apply_source_map.
let err = match err {
match err {
deno::JSErrorOr::JSError(err) => {
RustOrJsError::Js(worker_.apply_source_map(err))
}
deno::JSErrorOr::Other(err) => RustOrJsError::Rust(err),
};
err
}
})
}

Expand Down
2 changes: 1 addition & 1 deletion core/modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl<L: Loader> Future for RecursiveLoad<L> {
for specifier in imports {
self
.add(&specifier, referrer, Some(mod_id))
.map_err(|e| JSErrorOr::Other(e))?;
.map_err(JSErrorOr::Other)?;
}
} else if need_alias {
let mut modules = self.modules.lock().unwrap();
Expand Down

0 comments on commit 439d4d1

Please sign in to comment.