Skip to content

Commit a9e367f

Browse files
bors[bot]cgwalters
andauthored
Merge #540
540: either_or_both: Fix inverted Left/Right in docstrings r=phimuemue a=cgwalters I stared at this for a bit, confused before deciding the docs must be wrong. Co-authored-by: Colin Walters <[email protected]>
2 parents 271a341 + bfe4b8a commit a9e367f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/either_or_both.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl<A, B> EitherOrBoth<A, B> {
140140
}
141141
}
142142

143-
/// Apply the function `f` on the value `b` in `Right(b)` or `Both(a, _)` variants if it is
143+
/// Apply the function `f` on the value `a` in `Left(a)` or `Both(a, _)` variants if it is
144144
/// present.
145145
pub fn left_and_then<F, L>(self, f: F) -> EitherOrBoth<L, B>
146146
where
@@ -152,8 +152,8 @@ impl<A, B> EitherOrBoth<A, B> {
152152
}
153153
}
154154

155-
/// Apply the function `f` on the value `a`
156-
/// in `Left(a)` or `Both(a, _)` variants if it is present.
155+
/// Apply the function `f` on the value `b`
156+
/// in `Right(b)` or `Both(_, b)` variants if it is present.
157157
pub fn right_and_then<F, R>(self, f: F) -> EitherOrBoth<A, R>
158158
where
159159
F: FnOnce(B) -> EitherOrBoth<A, R>,

0 commit comments

Comments
 (0)