remove unnecessary checks on slices

This commit is contained in:
Benjamin George Roberts 2022-09-23 17:58:06 +10:00
parent 09863b540d
commit c52e3aafe6
4 changed files with 24 additions and 31 deletions

View file

@ -234,10 +234,8 @@ func (key *PreAuthKey) toProto() *v1.PreAuthKey {
protoKey.CreatedAt = timestamppb.New(*key.CreatedAt)
}
if len(key.ACLTags) > 0 {
for idx := range key.ACLTags {
protoKey.AclTags[idx] = key.ACLTags[idx].Tag
}
for idx := range key.ACLTags {
protoKey.AclTags[idx] = key.ACLTags[idx].Tag
}
return &protoKey