Skip to content

Commit

Permalink
Do not require Push target Sized
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru committed Jun 21, 2024
1 parent ef8912c commit 99a5714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub trait Containerized {
}

/// Push an item `T` into a region.
pub trait Push<T>: Region {
pub trait Push<T: ?Sized>: Region {
/// Push `item` into self, returning an index that allows to look up the
/// corresponding read item.
#[must_use]
Expand All @@ -99,7 +99,7 @@ pub trait Push<T>: Region {
/// Reserve space in the receiving region.
///
/// Closely related to [`Push`], but separate because target type is likely different.
pub trait ReserveItems<T>: Region {
pub trait ReserveItems<T: ?Sized> {
/// Ensure that the region can absorb `items` without reallocation.
fn reserve_items<I>(&mut self, items: I)
where
Expand Down

0 comments on commit 99a5714

Please sign in to comment.