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

Into version for SecretString expose_secret #1182

Open
tisonkun opened this issue Apr 26, 2024 · 0 comments
Open

Into version for SecretString expose_secret #1182

tisonkun opened this issue Apr 26, 2024 · 0 comments

Comments

@tisonkun
Copy link

I found that we have a rewrite also. When do we release 0.9 for secrecy?

For this issue, I found:

impl<S> ExposeSecret<S> for Secret<S>
where
    S: Zeroize,
{
    fn expose_secret(&self) -> &S {
        &self.inner_secret
    }
}

But perhaps I'd like to move the inner secret in some case, and thus an into version can help to avoid copy.

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

No branches or pull requests

1 participant