shardlab / discordrb

Discord API for Ruby
MIT License
532 stars 98 forks source link

Ineffective guard clauses #246

Open darrenboyd opened 11 months ago

darrenboyd commented 11 months ago

Found some ineffective guard clauses that do a guard check, but don't return...

https://github.com/shardlab/discordrb/blob/0f01116c3326e4784a0b581326307f5a2b57427a/lib/discordrb/data/overwrite.rb#L68

https://github.com/shardlab/discordrb/blob/0f01116c3326e4784a0b581326307f5a2b57427a/lib/discordrb/permissions.rb#L139

Daniel-Worrall commented 11 months ago

Nice catch First introduced https://github.com/shardlab/discordrb/commit/9ba6e52455c533155fc6a7db8c3640028771217c