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

Use of impl Into<String> in RequestBuilder::bearer_auth #167

Open
fgimian opened this issue Jun 17, 2024 · 0 comments
Open

Use of impl Into<String> in RequestBuilder::bearer_auth #167

fgimian opened this issue Jun 17, 2024 · 0 comments

Comments

@fgimian
Copy link

fgimian commented Jun 17, 2024

Hey there, great job on this library, thanks for all your hard work! 😄

I was wondering why the bearer_auth function uses token: impl Into<String>. This would potentially result in unnecessary allocation of a String just for use in the Authorization header.

Is there any reason AsRef<str> could not be used instead?

Cheers
Fotis

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