bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Leo Prikler
Subject: bug#45570: [PATCH v2] system: Assert, that user and group names are unique.
Date: Thu, 07 Jan 2021 12:13:31 +0100
User-agent: Evolution 3.34.2

Am Donnerstag, den 07.01.2021, 09:35 +0100 schrieb Ludovic Courtès:
> Leo Prikler <leo.prikler@student.tugraz.at> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]