julelang / jule

Effective programming language to build efficient, fast, reliable and safe software while maintaining simplicity
https://jule.dev
BSD 3-Clause "New" or "Revised" License
128 stars 13 forks source link

fix: check if `*this` is `src` in `Array::operator==` #86

Closed vil02 closed 7 months ago

vil02 commented 7 months ago

Description

Note that, since this->begin() == src.begin() is equivalent to *this == src, because buf is owned by the Array object.

Checklist

Screenshots (if any)

Note to reviewers

Simplify condition in Array::operator==.