diff --git a/hugr-core/src/hugr/internal.rs b/hugr-core/src/hugr/internal.rs index 1301457a4..ef9030557 100644 --- a/hugr-core/src/hugr/internal.rs +++ b/hugr-core/src/hugr/internal.rs @@ -35,7 +35,10 @@ pub trait HugrInternals { } impl HugrInternals for Hugr { - type Portgraph<'p> = &'p MultiPortGraph where Self: 'p; + type Portgraph<'p> + = &'p MultiPortGraph + where + Self: 'p; #[inline] fn portgraph(&self) -> Self::Portgraph<'_> { @@ -54,7 +57,10 @@ impl HugrInternals for Hugr { } impl HugrInternals for &T { - type Portgraph<'p> = T::Portgraph<'p> where Self: 'p; + type Portgraph<'p> + = T::Portgraph<'p> + where + Self: 'p; delegate! { to (**self) { fn portgraph(&self) -> Self::Portgraph<'_>; @@ -65,7 +71,10 @@ impl HugrInternals for &T { } impl HugrInternals for &mut T { - type Portgraph<'p> = T::Portgraph<'p> where Self: 'p; + type Portgraph<'p> + = T::Portgraph<'p> + where + Self: 'p; delegate! { to (**self) { fn portgraph(&self) -> Self::Portgraph<'_>; @@ -76,7 +85,10 @@ impl HugrInternals for &mut T { } impl HugrInternals for Rc { - type Portgraph<'p> = T::Portgraph<'p> where Self: 'p; + type Portgraph<'p> + = T::Portgraph<'p> + where + Self: 'p; delegate! { to (**self) { fn portgraph(&self) -> Self::Portgraph<'_>; @@ -87,7 +99,10 @@ impl HugrInternals for Rc { } impl HugrInternals for Arc { - type Portgraph<'p> = T::Portgraph<'p> where Self: 'p; + type Portgraph<'p> + = T::Portgraph<'p> + where + Self: 'p; delegate! { to (**self) { fn portgraph(&self) -> Self::Portgraph<'_>; diff --git a/hugr-core/src/hugr/views/root_checked.rs b/hugr-core/src/hugr/views/root_checked.rs index 989719377..88b0ad020 100644 --- a/hugr-core/src/hugr/views/root_checked.rs +++ b/hugr-core/src/hugr/views/root_checked.rs @@ -49,7 +49,10 @@ impl RootChecked<&mut Hugr, Root> { } impl, Root> HugrInternals for RootChecked { - type Portgraph<'p> = &'p MultiPortGraph where Self: 'p; + type Portgraph<'p> + = &'p MultiPortGraph + where + Self: 'p; delegate! { to self.as_ref() { fn portgraph(&self) -> Self::Portgraph<'_>;