riking / AutoDelete

A Discord bot that automatically deletes all messages in a designated channel on a rolling basis
Apache License 2.0
326 stars 118 forks source link

Switch from bool to struct{} in hash set, improves memory usage #28

Closed leijurv closed 2 years ago

leijurv commented 3 years ago

I figured this was okay since you use struct{} elsewhere, such as map[*ManagedChannel]struct{} in queue.go and chan struct{} in channel.go.

riking commented 2 years ago

This isn't a very big memory concern, I'll keep the better ergonomics.