diff options
author | Philipp Korber <p.korber@1aim.com> | 2019-02-04 11:38:45 +0100 |
---|---|---|
committer | Philipp Korber <p.korber@1aim.com> | 2019-02-04 11:44:28 +0100 |
commit | df2fe3f818e496383643f4bbda4a4e646f5e69fa (patch) | |
tree | 20fac80c8eb50e37f11459cd312203cd05cfbd4e /internals/src/encoder/encodable.rs | |
parent | 1ae19a5b9a4e3e520db3f9d66da98e0c0e1e46e7 (diff) |
chore(rust): Use UFC Syntax for any custom `type_id` methods.
This is neccessary as `Any::get_type_id` is getting stabilized
as `Any::type_id` leading to potential brakage wrt. the compiler
failing due to syntax ambiguity.
Diffstat (limited to 'internals/src/encoder/encodable.rs')
-rw-r--r-- | internals/src/encoder/encodable.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internals/src/encoder/encodable.rs b/internals/src/encoder/encodable.rs index b06a9bc..ff1e29a 100644 --- a/internals/src/encoder/encodable.rs +++ b/internals/src/encoder/encodable.rs @@ -18,7 +18,7 @@ pub trait EncodableInHeader: Send + Sync + Any + Debug { fn boxed_clone(&self) -> Box<EncodableInHeader>; #[doc(hidden)] - fn type_id( &self ) -> TypeId { + fn type_id(&self) -> TypeId { TypeId::of::<Self>() } } @@ -28,7 +28,7 @@ impl EncodableInHeader { #[inline(always)] pub fn is<T: EncodableInHeader>(&self) -> bool { - self.type_id() == TypeId::of::<T>() + EncodableInHeader::type_id(self) == TypeId::of::<T>() } |