Skip to content

cookie test: use maps.Equal instead of reflect.DeepEquals#544

Closed
pixelherodev wants to merge 1 commit intoapache:mainfrom
pixelherodev:map-equals
Closed

cookie test: use maps.Equal instead of reflect.DeepEquals#544
pixelherodev wants to merge 1 commit intoapache:mainfrom
pixelherodev:map-equals

Conversation

@pixelherodev
Copy link
Copy Markdown
Contributor

This is a drive-by patch; the test was failing for the other optimization, and I noticed this when I went to take a look and figured I'd just send the patch.

Rationale for this change

map.Equals, for two values known to both be of type map[string]string, is a strictly faster and smaller operation than reflect.DeepEquals. This patch isn't really necessary, since it's only for a test, but it's good practice.

Are these changes tested?

The test is passing on my machine, yes.

Are there any user-facing changes?

No

This is a drive-by patch; the test was failing for the other
optimization, and I noticed this when I went to take a look and figured
I'd just send the patch.
@pixelherodev
Copy link
Copy Markdown
Contributor Author

Just going to add this to the other one.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant