diff options
Diffstat (limited to 'src/facility.rs')
| -rw-r--r-- | src/facility.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/facility.rs b/src/facility.rs index 824a864..c156570 100644 --- a/src/facility.rs +++ b/src/facility.rs @@ -48,7 +48,7 @@ pub trait CreatableFacility: Facility + Sized { * As far as why the compiler can't reach that conclusion on its own and * skip it, we have no specific information. */ - fn new() -> Result<Self>; + async fn new() -> Result<Self>; /* The only way to coerce to dyn is to return as it! */ fn as_box<'a>(self) -> Box<dyn Facility + 'a> @@ -68,9 +68,9 @@ bitflags! { } impl FacilityType { - pub fn new<'a>(&self) -> Result<Box<dyn Facility + 'a>> { + pub async fn new(&self) -> Result<Box<dyn Facility>> { match self { - &FacilityType::ENVSYS => Ok(EnvSys::new()?.as_box()), + &FacilityType::ENVSYS => Ok(EnvSys::new().await?.as_box()), _ => todo!() } } |