Skip to content

Commit

Permalink
chore: add the missing dyns
Browse files Browse the repository at this point in the history
  • Loading branch information
toku-sa-n committed Mar 19, 2021
1 parent df5828e commit 2ae18f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ impl HashTable {
}
}

pub fn lookup<'a, F>(&'a self, _name: &str, _f: F) -> &'a Entry
where F: Fn(&'a Entry) -> bool
pub fn lookup<'a, F>(&'a self, _name: &str, _f: F) -> &'a dyn Entry
where F: Fn(&'a dyn Entry) -> bool
{
// TODO
unimplemented!();
Expand Down
2 changes: 1 addition & 1 deletion src/symbol_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub trait Entry {
}
}

impl fmt::Display for Entry {
impl fmt::Display for dyn Entry {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(writeln!(f, "Symbol table entry:"));
try!(writeln!(f, " name: {:?}", self.name()));
Expand Down

0 comments on commit 2ae18f2

Please sign in to comment.