Merge pull request #199 from multun/query-mut-debug

ecs: impl Debug for Mut<...>
This commit is contained in:
Carter Anderson 2020-08-15 17:57:37 -07:00 committed by GitHub
commit f85867139b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,6 +182,12 @@ impl<'a, T: Component> DerefMut for Mut<'a, T> {
}
}
impl<'a, T: Component + core::fmt::Debug> core::fmt::Debug for Mut<'a, T> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
self.value.fmt(f)
}
}
impl<'a, T: Component> Query for Mut<'a, T> {
type Fetch = FetchMut<T>;
}