Replace tuples with structs in patterns