Subject: bug#45570: [PATCH v2] system: Assert, that user and group names are unique.

From: Leo Prikler <[email-masked]>
Date: Thu, 07 Jan 2021 12:13:31 +0100

Am Donnerstag, den 07.01.2021, 09:35 +0100 schrieb Ludovic Courtès:
> Leo Prikler <[email-masked]> skribis:
> 
> > *gnu/system/shadow.scm (find-duplicates): New variable.
> > (assert-unique-account-names, assert-unique-group-names): New
> > variables.
> > (account-activation): Use them here.
> 
> Final nitpicks!  :-)
> 
> > +(define (find-duplicates list)
> 
> Please add a docstring.
Done, see v3.

> > +  (let loop ((table (make-hash-table))
> > +             (list list))
> 
> You can move ‘table’ out of the ‘loop’ arguments since it’s mutated
> anyway.
I don't see any benefit from doing so, however.  It'd be an additional
layer of mutation and if we ever wanted to change to vhashes or alists
we'd have to refactor that.  

Regards,
Leo