Skip to content

Commit

Permalink
Add dyn to be rust nightly compatible (#2538)
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk authored and ry committed Jun 18, 2019
1 parent d5e80ad commit ed390a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions core/isolate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ mod tests {
}

impl Error for MockError {
fn cause(&self) -> Option<&Error> {
fn cause(&self) -> Option<&dyn Error> {
unimplemented!()
}
}
Expand Down

0 comments on commit ed390a5

Please sign in to comment.