Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [v0.9.2] 2025-11-12

- Added `from_bytes_truncating_at_nul` to `CString`
- Added missing `?Sized` bounds in `PartialEq` implementations
- Make `PartialEq` implementation for `DequeInner` and `HistoryBufInner` generic over the storage of the RHS

## [v0.9.2] 2025-11-12

- Minor fixes to module docs.
- Make MSRV of 1.87.0 explicit.
- Implement `Default` for `CapacityError`.
Expand Down
10 changes: 7 additions & 3 deletions src/deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,9 +1164,13 @@ where
}
}

impl<T: PartialEq, const N: usize> PartialEq for Deque<T, N> {
fn eq(&self, other: &Self) -> bool {
if self.len() != other.len() {
impl<T: PartialEq, S1, S2> PartialEq<DequeInner<T, S2>> for DequeInner<T, S1>
where
S1: VecStorage<T> + ?Sized,
S2: VecStorage<T> + ?Sized,
{
fn eq(&self, other: &DequeInner<T, S2>) -> bool {
if self.storage_len() != other.storage_len() {
return false;
}
let (sa, sb) = self.as_slices();
Expand Down
6 changes: 4 additions & 2 deletions src/history_buf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,11 +610,13 @@ impl<T, const N: usize> Default for HistoryBuf<T, N> {
}
}

impl<T, S: HistoryBufStorage<T> + ?Sized> PartialEq for HistoryBufInner<T, S>
impl<T, S1, S2> PartialEq<HistoryBufInner<T, S2>> for HistoryBufInner<T, S1>
where
T: PartialEq,
S1: HistoryBufStorage<T> + ?Sized,
S2: HistoryBufStorage<T> + ?Sized,
{
fn eq(&self, other: &Self) -> bool {
fn eq(&self, other: &HistoryBufInner<T, S2>) -> bool {
self.oldest_ordered().eq(other.oldest_ordered())
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ impl<A, B, LenTB, const M: usize, SB> PartialEq<VecInner<B, LenTB, SB>> for [A;
where
A: PartialEq<B>,
LenTB: LenType,
SB: VecStorage<B>,
SB: VecStorage<B> + ?Sized,
{
fn eq(&self, other: &VecInner<B, LenTB, SB>) -> bool {
self.eq(other.as_slice())
Expand All @@ -1620,7 +1620,7 @@ impl<A, B, LenTB, SB, const M: usize> PartialEq<VecInner<B, LenTB, SB>> for &[A;
where
A: PartialEq<B>,
LenTB: LenType,
SB: VecStorage<B>,
SB: VecStorage<B> + ?Sized,
{
fn eq(&self, other: &VecInner<B, LenTB, SB>) -> bool {
(*self).eq(other)
Expand All @@ -1631,7 +1631,7 @@ impl<A, B, LenTB, SB> PartialEq<VecInner<B, LenTB, SB>> for [A]
where
A: PartialEq<B>,
LenTB: LenType,
SB: VecStorage<B>,
SB: VecStorage<B> + ?Sized,
{
fn eq(&self, other: &VecInner<B, LenTB, SB>) -> bool {
self.eq(other.as_slice())
Expand All @@ -1642,7 +1642,7 @@ impl<A, B, LenTB, SB> PartialEq<VecInner<B, LenTB, SB>> for &[A]
where
A: PartialEq<B>,
LenTB: LenType,
SB: VecStorage<B>,
SB: VecStorage<B> + ?Sized,
{
fn eq(&self, other: &VecInner<B, LenTB, SB>) -> bool {
(*self).eq(other)
Expand Down