Remove useless pattern matching