Skip to content

Commit

Permalink
Add #[inline] on insert_from_slice to reduce code size
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Aug 17, 2023
1 parent f5bd2af commit 201b1e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,7 @@ where
/// elements toward the back.
///
/// For slices of `Copy` types, this is more efficient than `insert`.
#[inline]
pub fn insert_from_slice(&mut self, index: usize, slice: &[A::Item]) {
self.reserve(slice.len());

Expand Down

0 comments on commit 201b1e9

Please sign in to comment.