Skip to content

check for rand.Int error added via latest PR#224

Open
cppforlife wants to merge 1 commit intodevelopfrom
check-err
Open

check for rand.Int error added via latest PR#224
cppforlife wants to merge 1 commit intodevelopfrom
check-err

Conversation

@cppforlife
Copy link
Copy Markdown
Contributor

No description provided.

plus minor stylistic tweaks

Signed-off-by: Dmitriy Kalinin <dkalinin@vmware.com>
Copy link
Copy Markdown
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good I just have a minor comment that maybe we can improve.

func localCryptoShuffle(n int, swap func(i, j int)) {
func (*PasswordReconciler) localCryptoShuffle(n int, swap func(i, j int)) error {
if n < 0 {
panic("invalid argument to Shuffle")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not panic the generator unless it is an internal inconsistency error. This looks like invalid input from the spec itself, since we now have an output error maybe we can return it instead.

@neil-hickey
Copy link
Copy Markdown

hey @joaopapereira / @cppforlife, just checking in to see if we can push this PR through? Any blockers or discussions needed?

@neil-hickey
Copy link
Copy Markdown

Hey @cppforlife / @joaopapereira . This one has been sitting for a long time, shall we close it out? Or can we get this over the line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants