Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary anonymous functions in defer statements #3298

Closed
3 tasks
chatton opened this issue Mar 15, 2023 · 2 comments · Fixed by #3304
Closed
3 tasks

Remove unnecessary anonymous functions in defer statements #3298

chatton opened this issue Mar 15, 2023 · 2 comments · Fixed by #3304
Assignees
Labels
good first issue Good for newcomers type: code hygiene Clean up code but without changing functionality or interfaces

Comments

@chatton
Copy link
Contributor

chatton commented Mar 15, 2023

Summary

Throughout the codebase I've noticed several defer statements that are wrapped in an anonymous function, e.g. this one

	defer func() {
		telemetry.IncrCounter(1, "ibc", "connection", "open-try")
	}()

can be changed to

defer telemetry.IncrCounter(1, "ibc", "connection", "open-try")

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@chatton chatton added the type: code hygiene Clean up code but without changing functionality or interfaces label Mar 15, 2023
@damiannolan damiannolan added the good first issue Good for newcomers label Mar 15, 2023
@GNaD13
Copy link
Contributor

GNaD13 commented Mar 16, 2023

Hi sir @chatton, Can I take this issue?

@crodriguezvega
Copy link
Contributor

Hi sir @chatton, Can I take this issue?

Yes, that would be lovely. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type: code hygiene Clean up code but without changing functionality or interfaces
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants