Skip to content

Commit 55efb17

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 4ac7722 commit 55efb17

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
@@ -306,7 +306,7 @@ impl TestResult {
306306
/// }
307307
/// ```
308308
#[derive(Clone, Debug)]
309-
pub struct Equivalence<T>(T, T)
309+
pub struct Equivalence<T>(pub T, pub T)
310310
where
311311
T: Debug + PartialEq + 'static;
312312

0 commit comments

Comments
 (0)