Skip to content

refactor: Use a more direct and less error-prone return value #3665

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

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

pinglanlu
Copy link
Contributor

Since err != nil has been judged before, nil is returned directly here, which is more obvious, readable and less error-prone.

Just like

return newSubnet, nil
and

@Zheaoli Zheaoli changed the title Use a more direct and less error-prone return value refactor: Use a more direct and less error-prone return value Nov 12, 2024
Copy link
Member

@Zheaoli Zheaoli left a comment

Choose a reason for hiding this comment

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

LGTM, but need update with main branch after #3666 has been merged to rerun the CI

@Zheaoli Zheaoli merged commit 966c25f into containerd:main Nov 14, 2024
30 checks passed
@AkihiroSuda AkihiroSuda added this to the v2.1.0 milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants