diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2019-06-18 23:28:56 +1000 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-18 06:28:56 -0700 |
commit | ed390a51cac08ec238b45c793a5ddd65fcae1b78 (patch) | |
tree | 67c6e0443a07831b13d011be50f7efc4d932cea1 /core | |
parent | d5e80ad67744bbd2646af0a0abe27cc38205f990 (diff) |
Add dyn to be rust nightly compatible (#2538)
Diffstat (limited to 'core')
-rw-r--r-- | core/isolate.rs | 4 | ||||
-rw-r--r-- | core/modules.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/isolate.rs b/core/isolate.rs index 1ba86d727..cdb505342 100644 --- a/core/isolate.rs +++ b/core/isolate.rs @@ -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. diff --git a/core/modules.rs b/core/modules.rs index 5a0e33798..a8252bea5 100644 --- a/core/modules.rs +++ b/core/modules.rs @@ -597,7 +597,7 @@ mod tests { } impl Error for MockError { - fn cause(&self) -> Option<&Error> { + fn cause(&self) -> Option<&dyn Error> { unimplemented!() } } |