From bdef958bdccc4b1d11cd8408a5c29167b5385dc0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 28 Nov 2020 05:09:16 +0000 Subject: nntpd: remove redundant {groups} shortcut It's not worth confusing hackers reading the source to have two ways to access the same (large) hash table. So just go through PublicInbox::Config objects for now since the extra hash lookup isn't going to be noticeable. I've also started favoring "for" instead of "foreach" since they're the equivalent perlop and less wear on my fingers + keyboard. --- lib/PublicInbox/NNTPD.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/NNTPD.pm') diff --git a/lib/PublicInbox/NNTPD.pm b/lib/PublicInbox/NNTPD.pm index 33bc5fda..5e287857 100644 --- a/lib/PublicInbox/NNTPD.pm +++ b/lib/PublicInbox/NNTPD.pm @@ -60,9 +60,8 @@ sub refresh_groups { } }); $self->{groupnames} = [ sort(keys %$groups) ]; - $self->{pi_config} = $pi_config; # this will destroy old groups that got deleted - $self->{groups} = $groups; + $self->{pi_config} = $pi_config; } sub idler_start { -- cgit v1.2.3-24-ge0c7