Skip to content

Commit

Permalink
Use OffsetOptimized in consecutive offset pairs (#43)
Browse files Browse the repository at this point in the history
Switches from `Vec` to `OffsetOptimized`, which should be a strict
improvement.

Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru authored Jun 21, 2024
1 parent 6cb83c5 commit dbfd348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/impls/deduplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

use crate::impls::offsets::OffsetContainer;
use crate::impls::offsets::{OffsetContainer, OffsetOptimized};
use crate::{Push, Region, ReserveItems};

/// A region to deduplicate consecutive equal items.
Expand Down Expand Up @@ -116,7 +116,7 @@ where
/// ```
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct ConsecutiveOffsetPairs<R, O = Vec<usize>>
pub struct ConsecutiveOffsetPairs<R, O = OffsetOptimized>
where
R: Region<Index = (usize, usize)>,
O: OffsetContainer<usize>,
Expand Down

0 comments on commit dbfd348

Please sign in to comment.