1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

Add dyn to be rust nightly compatible (#2538)

This commit is contained in:
Kitson Kelly 2019-06-18 23:28:56 +10:00 committed by Ryan Dahl
parent d5e80ad677
commit ed390a51ca
3 changed files with 4 additions and 4 deletions

View file

@ -94,7 +94,7 @@ impl Repl {
.editor
.readline(&prompt)
.map(|line| {
self.editor.add_history_entry(line.as_ref());
self.editor.add_history_entry(line.clone());
line
}).map_err(|e| deno_error(ErrorKind::Other, e.description().to_string()))
// Forward error to TS side for processing

View file

@ -76,10 +76,10 @@ pub enum StartupData<'a> {
pub type OpResult<E> = Result<Op<E>, E>;
type CoreDispatchFn = Fn(&[u8], Option<PinnedBuf>) -> CoreOp;
type CoreDispatchFn = dyn Fn(&[u8], Option<PinnedBuf>) -> CoreOp;
pub type DynImportFuture = Box<dyn Future<Item = deno_mod, Error = ()> + Send>;
type DynImportFn = Fn(&str, &str) -> DynImportFuture;
type DynImportFn = dyn Fn(&str, &str) -> DynImportFuture;
/// Wraps DynImportFuture to include the deno_dyn_import_id, so that it doesn't
/// need to be exposed.

View file

@ -597,7 +597,7 @@ mod tests {
}
impl Error for MockError {
fn cause(&self) -> Option<&Error> {
fn cause(&self) -> Option<&dyn Error> {
unimplemented!()
}
}