mirror of
https://github.com/TECHNOFAB11/aerosol.git
synced 2025-12-11 23:50:07 +01:00
Broaden debug implementation
This commit is contained in:
parent
bf9ed6ae36
commit
4d0f5f3dc7
2 changed files with 8 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "aerosol"
|
||||
version = "1.0.0-alpha.7"
|
||||
version = "1.0.0-alpha.8"
|
||||
authors = ["Diggory Blake <diggsey@googlemail.com>"]
|
||||
edition = "2018"
|
||||
description = "Simple dependency injection for Rust"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use std::{any::Any, marker::PhantomData, sync::Arc, task::Poll};
|
||||
use std::{any::Any, fmt::Debug, marker::PhantomData, sync::Arc, task::Poll};
|
||||
|
||||
use anymap::hashbrown::{Entry, Map};
|
||||
use frunk::{
|
||||
|
|
@ -20,13 +20,18 @@ pub(crate) struct InnerAero {
|
|||
/// Stores a collection of resources keyed on resource type.
|
||||
/// Provides methods for accessing this collection.
|
||||
/// Can be cheaply cloned.
|
||||
#[derive(Debug)]
|
||||
#[repr(transparent)]
|
||||
pub struct Aero<R: ResourceList = HNil> {
|
||||
pub(crate) inner: Arc<RwLock<InnerAero>>,
|
||||
pub(crate) phantom: PhantomData<Arc<R>>,
|
||||
}
|
||||
|
||||
impl<R: ResourceList> Debug for Aero<R> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
self.inner.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl Aero {
|
||||
/// Construct a new instance of the type with no initial resources.
|
||||
pub fn new() -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue