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

Preserve case of --verify path #181

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

blyxxyz
Copy link
Collaborator

@blyxxyz blyxxyz commented Oct 19, 2021

Resolves #180.

@ducaale ducaale self-requested a review October 19, 2021 11:14
Comment on lines +907 to 916
fn from(verify: &OsStr) -> Verify {
if let Some(text) = verify.to_str() {
match text.to_lowercase().as_str() {
"no" | "false" => return Verify::No,
"yes" | "true" => return Verify::Yes,
_ => (),
}
}
Verify::CustomCaBundle(PathBuf::from(verify))
}
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe we could flatten the logic a little bit?

 match verify.to_ascii_lowercase().to_str() {
    Some("no") | Some("false") => Verify::No,
    Some("yes") | Some("true") => Verify::Yes,
    _ => Verify::CustomCaBundle(PathBuf::from(verify)),
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It looks nicer, but I guess it only works as of 1.53.

@blyxxyz blyxxyz force-pushed the preserve-verify-case branch 2 times, most recently from fa1fa00 to af34148 Compare October 19, 2021 11:56
Copy link
Owner

@ducaale ducaale left a comment

Choose a reason for hiding this comment

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

LGTM

@ducaale ducaale merged commit 8d6442c into ducaale:develop Oct 19, 2021
@blyxxyz blyxxyz deleted the preserve-verify-case branch October 19, 2021 13:50
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.

None yet

2 participants