switch to upstream petgraph 0.8.1 #32

Merged
programmerjake merged 11 commits from programmerjake/fayalite:switch-to-upstream-petgraph into master 2025-04-10 04:10:16 +00:00
Showing only changes of commit 4eda4366c8 - Show all commits

View file

@ -274,6 +274,17 @@ pub struct Expr<T: Type> {
impl<T: Type + fmt::Debug> fmt::Debug for Expr<T> { impl<T: Type + fmt::Debug> fmt::Debug for Expr<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[cfg(debug_assertions)]
{
let Self {
__enum,
__ty,
__flow,
} = self;
let expr_ty = __ty.canonical();
let enum_ty = __enum.to_expr().__ty;
assert_eq!(expr_ty, enum_ty, "expr ty mismatch:\nExpr {{\n__enum: {__enum:?},\n__ty: {__ty:?},\n__flow: {__flow:?}\n}}");
}
self.__enum.fmt(f) self.__enum.fmt(f)
} }
} }