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

chore: reduce boilplate for some endpoint checkings; keep error same style. #5047

Closed
wants to merge 4 commits into from

Conversation

yjhmelody
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

Polish code and abstract some common useful functions to reduce boilplate code.

TODO: do more such things in the follow-up PRs

Are there any user-facing changes?

No

.with_context("service", Scheme::Alluxio)),
}?;
let endpoint =
Error::ensure_endpoint_not_empty(self.config.endpoint.as_deref(), Self::SCHEME)
Copy link
Member

Choose a reason for hiding this comment

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

Thanks a lot for the PR, but I don't want to optimize code in this way.

Copy link
Member

Choose a reason for hiding this comment

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

The reason is similiar to #5037 (comment)

@yjhmelody
Copy link
Contributor Author

Ok.

@yjhmelody yjhmelody closed this Aug 28, 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.

2 participants