Skip to content

Commit

Permalink
Clarify example in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 committed Aug 2, 2019
1 parent d48cdd0 commit 8b307a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions text/0000-knowntypeid.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ impl CanDoThing for DoesThing {

impl dyn CanDoThing + 'static {
pub fn is<T: CanDoThing + 'static>(&self) -> bool {
// `TypeId::of::<Self>()` would be `dyn CanDoThing`, not the "actual" type of Self
TypeId::of::<T>() == self.type_id()
}

Expand Down

0 comments on commit 8b307a1

Please sign in to comment.