Commit 948a2b42 authored by Jeff Smits's avatar Jeff Smits

Update PartialEq with String

parent 6a073f7f
......@@ -216,6 +216,9 @@ impl<'s, B: PartialEq> PartialEq for Term<'s, B> {
(&Application(lc, ref lch), &Application(rc, ref rch)) => {
ptr::eq(lc, rc) && lch == rch
}
(&String(lc), &String(rc)) => {
ptr::eq(lc, rc)
}
(&List(ref l), &List(ref r)) => l == r,
(&Placeholder(_, ref l), &Placeholder(_, ref r)) => l == r,
(&Blob(ref l), &Blob(ref r)) => l == r,
......@@ -236,6 +239,7 @@ where
Long(l) => write!(writer, "{}", l),
Real(BrokenF32(r)) => write!(writer, "{}", r),
Application(cons, ref children) => {
// write!(writer, "{:p}#{}", cons, cons)?;
writer.write_str(cons)?;
if !children.is_empty() {
write!(writer, "(")?;
......@@ -245,6 +249,7 @@ where
Ok(())
}
String(string) => {
// write!(writer, "{:p}#{:?}", string, string)
write!(writer, "{:?}", string)
}
List(ref l) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment