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

add_history_line could take a Into<String> #77

Closed
Yamakaky opened this issue Sep 23, 2016 · 2 comments
Closed

add_history_line could take a Into<String> #77

Yamakaky opened this issue Sep 23, 2016 · 2 comments

Comments

@Yamakaky
Copy link

Yamakaky commented Sep 23, 2016

Or a Into<String>

@kkawakam
Copy link
Owner

kkawakam commented Oct 4, 2016

What is the motivation for this?

@Yamakaky
Copy link
Author

Yamakaky commented Oct 4, 2016

You clone the line parameter. If the caller has a String and don't plan to reuse it, that one allocation to make.

@Yamakaky Yamakaky changed the title add_history_line could take a Cow<str> add_history_line could take a Into<String> Oct 4, 2016
gwenn added a commit to gwenn/rustyline that referenced this issue Oct 17, 2016
kkawakam added a commit that referenced this issue Oct 24, 2016
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

2 participants