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

Implement FromStr for SecretString #1234

Closed
azhur opened this issue Oct 3, 2024 · 4 comments · Fixed by #1237 or #1240
Closed

Implement FromStr for SecretString #1234

azhur opened this issue Oct 3, 2024 · 4 comments · Fixed by #1237 or #1240

Comments

@azhur
Copy link
Contributor

azhur commented Oct 3, 2024

This could be convenient for use cases like using secrecy + https://github.com/greyblake/envconfig-rs that rely on FromStr

@azhur azhur changed the title Implement FromStr for SecrecyString Implement FromStr for SecretString Oct 3, 2024
@tony-iqlusion
Copy link
Member

Since the conversion is infallible, I've added a From<&str> impl instead: #1237

@azhur
Copy link
Contributor Author

azhur commented Oct 10, 2024

@tony-iqlusion We are using envconfig crate and it requires FromStr to be implemented so it won't work having just From<&str>. The previous secrecy versions had FromStr implemented, now we can't upgrade secrecy so I'm wondering If we can add back FromStr implementation.

I'm happy to create a PR if you agree to add FromStr.

@tony-iqlusion
Copy link
Member

Ok, we can add a FromStr impl with Err = Infallible

@cemoktra
Copy link

when do you plan to publish this? i'm also running into this during update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants