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

StrBuf::from_owned_str makes a copy #13508

Closed
SimonSapin opened this issue Apr 14, 2014 · 1 comment
Closed

StrBuf::from_owned_str makes a copy #13508

SimonSapin opened this issue Apr 14, 2014 · 1 comment

Comments

@SimonSapin
Copy link
Contributor

… despite its documentation claiming it doesn’t.

Ideally, we should:

  • Add a no-copy Vec::from_owned_slice, based on Vec::from_raw_parts
  • Change StrBuf::from_owned_str to use Vec::from_owned_slice

Alternatively (or in the meantime), remove the claim from the documentation.

@alexcrichton
Copy link
Member

The comment is referring to a post-DST world in which it doesn't make a copy. In the interim (before it's implemented), it will be forced to make a copy.

Closing because this will hopefully be implemented soon!

notriddle pushed a commit to notriddle/rust that referenced this issue Nov 10, 2022
flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 18, 2024
…ssify, r=llogiq

Cleanup `const_float_classify`

As mentioned at rust-lang#13508 `const_float_classify` has been stabilized recently in rust-lang#130157 and can be cleanup

Close rust-lang#13508

changelog: [none]
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