Skip to content

Commit

Permalink
Upgrade to 1.83 and redo cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed Nov 29, 2024
1 parent 6d63747 commit d878edd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
25 changes: 20 additions & 5 deletions hugr-core/src/hugr/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<'_> {
Expand All @@ -54,7 +57,10 @@ impl HugrInternals for Hugr {
}

impl<T: HugrInternals> 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<'_>;
Expand All @@ -65,7 +71,10 @@ impl<T: HugrInternals> HugrInternals for &T {
}

impl<T: HugrInternals> 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<'_>;
Expand All @@ -76,7 +85,10 @@ impl<T: HugrInternals> HugrInternals for &mut T {
}

impl<T: HugrInternals> HugrInternals for Rc<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<'_>;
Expand All @@ -87,7 +99,10 @@ impl<T: HugrInternals> HugrInternals for Rc<T> {
}

impl<T: HugrInternals> HugrInternals for Arc<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<'_>;
Expand Down
5 changes: 4 additions & 1 deletion hugr-core/src/hugr/views/root_checked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ impl<Root> RootChecked<&mut Hugr, Root> {
}

impl<H: AsRef<Hugr>, Root> HugrInternals for RootChecked<H, Root> {
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<'_>;
Expand Down

0 comments on commit d878edd

Please sign in to comment.