Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #353 from sdroege/static-type-mutref
Browse files Browse the repository at this point in the history
Implement StaticType for &mut T in addition to the existing &T
  • Loading branch information
GuillaumeGomez committed Jul 6, 2018
2 parents e3c9de4 + afd3657 commit 4682dee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ impl<'a, T: ?Sized + StaticType> StaticType for &'a T {
}
}

impl<'a, T: ?Sized + StaticType> StaticType for &'a mut T {
fn static_type() -> Type {
T::static_type()
}
}

macro_rules! builtin {
($name:ident, $val:ident) => {
impl StaticType for $name {
Expand Down

0 comments on commit 4682dee

Please sign in to comment.