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

Do not consume self on builder getters #20

Open
brycx opened this issue Nov 29, 2020 · 0 comments
Open

Do not consume self on builder getters #20

brycx opened this issue Nov 29, 2020 · 0 comments

Comments

@brycx
Copy link
Collaborator

brycx commented Nov 29, 2020

key(), nonce(), ttl() and timestamp() all consume self. This means the builders instance needs to be cloned if a user wants to continue using it after calling any of the above getters. This seems unintentional. I suggest they all take &self instead of self.

pub fn nonce(&self) -> &[u8] {
        self.nonce
}
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