Skip to content

Into version for SecretString expose_secret  #1182

@tisonkun

Description

@tisonkun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions