IGI-111 / Smith

A simple text editor written in Rust
MIT License
169 stars 6 forks source link

Replace convoluted if lets with match statements, don't abuse PartialEq #21

Closed matthias-t closed 5 years ago

IGI-111 commented 6 years ago

That code was written a while ago, but now we can just use https://doc.rust-lang.org/std/mem/fn.discriminant.html

matthias-t commented 5 years ago

That's pretty smart. Here you go (also sorry about being so slow, I'm quite busy and I can't code as much as I'd like to).

IGI-111 commented 5 years ago

Yeah no worries man, we all got stuff to do.

Anyways this looks fine.