Skip to content

Commit 25d155f

Browse files
committed
Make fields in Equivalence public
`Equivalence` is meant to be trivially constructible, which was the movitation behind making it a tuple struct. However, it's still a _struct_ and its fields are not pubilic by default. Therefore, the type was not constructible as advertised, e.g. via `Equivalence(a, b)`. This change makes these fields public, as they are supposed to be.
1 parent dd7a4a0 commit 25d155f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tester.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ impl From<bool> for TestResult {
331331
/// }
332332
/// ```
333333
#[derive(Clone, Debug)]
334-
pub struct Equivalence<T>(T, T)
334+
pub struct Equivalence<T>(pub T, pub T)
335335
where
336336
T: Debug + PartialEq + 'static;
337337

0 commit comments

Comments
 (0)