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

feat(recycling): add customizable recycling policies #33

Merged
merged 11 commits into from
Feb 28, 2022
Prev Previous commit
Next Next commit
add'l doctest fixy
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw committed Feb 28, 2022
commit ca2890fad213f947b3c5008bc05927af88df3304
2 changes: 1 addition & 1 deletion src/recycling.rs
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ pub struct DefaultRecycle(());
/// // Because `MyCollection<T>` has `with_capacity`, `shrink_to`, and `clear` methods,
/// // we can implement `Recycle<MyCollection<T>>` for `WithCapacity` exactly the same
/// // way as it is implemented for standard library collections.
/// impl<T> Recycle<MyCollection<T>> for recycle::WithCapacity {
/// impl<T> Recycle<MyCollection<T>> for recycling::WithCapacity {
/// fn new_element(&self) -> MyCollection<T> {
/// // Allocate a new element with the minimum initial capacity:
/// MyCollection::with_capacity(self.min_capacity())