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: Add expect messages instead of unwraps #69

Merged
merged 5 commits into from
Nov 19, 2024
Merged

Conversation

vrongmeal
Copy link
Member

No description provided.

@vrongmeal vrongmeal requested a review from a team as a code owner November 19, 2024 19:01
src/client.rs Outdated
basin_zone: basin_endpoint.map(|b| b.parse().unwrap()),
cell: cell_endpoint
.parse()
.expect("should be a valid cell endpoint"),
Copy link
Member

Choose a reason for hiding this comment

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

preference for more affirmative expectations, e.g. valid cell endpoint, that ideally mention why it is reasonable to have that expectation, e.g. previously validated cell endpoint

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

Signed-off-by: Vaibhav Rabber <[email protected]>
Signed-off-by: Vaibhav Rabber <[email protected]>
src/client.rs Outdated
.user_agent(config.user_agent.clone())
.unwrap()
.expect("previously validated user agent")
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 here is that it is literally a HeaderValue right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup!

Copy link
Member Author

Choose a reason for hiding this comment

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

how would you prefer specifying this?

Copy link
Member Author

Choose a reason for hiding this comment

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

changed it to converting HeaderValue into HeaderValue, feels much more clear

@vrongmeal vrongmeal merged commit f39cb52 into main Nov 19, 2024
3 checks passed
@vrongmeal vrongmeal deleted the vrongmeal/conn-err branch November 19, 2024 19:41
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.

2 participants