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

try_* variants for slices #175

Open
stijnfrishert opened this issue Jul 18, 2022 · 1 comment
Open

try_* variants for slices #175

stijnfrishert opened this issue Jul 18, 2022 · 1 comment

Comments

@stijnfrishert
Copy link

stijnfrishert commented Jul 18, 2022

Looking at the interface, I'm missing:

  • try_alloc_slice_clone()
  • try_alloc_slice_copy()
  • try_alloc_slice_fill_clone()
  • try_alloc_slice_fill_copy()
  • try_alloc_slice_fill_default()
  • try_alloc_slice_iter()
  • try_alloc_slice_with()

Need try_alloc_slice_fill_copy() and try_alloc_slice_fill_default() myself, though why not add all while we're at it?

Is there a specific reason these weren't added?

@stijnfrishert
Copy link
Author

Ah, turns out try_* is for actual OS OOM, not the capacity given to Bump::with_capacity().

In that case I'm ok without these functions, but leaving the issue open for others.

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