Skip to content

Commit 2db331c

Browse files
committed
refactor!: rename trait AssertElements to AsssertFilteredElements
BREAKING CHANGE: The trait `AssertElements` is renamed to `AssertFilteredElements`. No change in behavior though. If you have a custom implementation for the `AssertElements` trait just rename the trait for the implementation.
1 parent 705928f commit 2db331c

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/assertions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4003,7 +4003,7 @@ pub trait AssertMapContainsValue<E> {
40034003
/// let subject = [42, 43, 44, 45, 46];
40044004
/// assert_that!(subject).none_satisfies(|e| *e < 42);
40054005
/// ```
4006-
pub trait AssertElements<T> {
4006+
pub trait AssertFilteredElements<T> {
40074007
/// A spec-like type that contains a single element as the subject that is
40084008
/// extracted from the iterator.
40094009
///

src/iterator/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Implementations of assertions for `Iterator` values.
22
33
use crate::assertions::{
4-
AssertElements, AssertIteratorContains, AssertIteratorContainsInAnyOrder,
4+
AssertFilteredElements, AssertIteratorContains, AssertIteratorContainsInAnyOrder,
55
AssertIteratorContainsInOrder, AssertOrderedElements,
66
};
77
use crate::colored::{
@@ -783,7 +783,7 @@ where
783783
}
784784
}
785785

786-
impl<'a, S, T, R> AssertElements<T> for Spec<'a, S, R>
786+
impl<'a, S, T, R> AssertFilteredElements<T> for Spec<'a, S, R>
787787
where
788788
S: IntoIterator<Item = T>,
789789
T: Debug,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@
822822
//! assert_that!(person).is_over_18();
823823
//! ```
824824
//!
825-
//! [`AssertElements`]: assertions::AssertElements
825+
//! [`AssertElements`]: assertions::AssertFilteredElements
826826
//! [`AssertFailure`]: spec::AssertFailure
827827
//! [`Expectation`]: spec::Expectation
828828
//! [`LengthProperty`]: properties::LengthProperty

src/recursive_comparison/value/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Debug for Field {
2828
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2929
let name = &self.name;
3030
let value = &self.value;
31-
write!(f, "{name}: {value:?}",)
31+
write!(f, "{name}: {value:?}")
3232
}
3333
}
3434

0 commit comments

Comments
 (0)