Skip to content

Commit f5bfc64

Browse files
committed
Add just infix to EitherOrBoth is_variant methods
1 parent 9e4bec3 commit f5bfc64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/either_or_both.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<A, B> EitherOrBoth<A, B> {
2424

2525
/// If Left, return true otherwise, return false.
2626
/// Exclusive version of [`has_left`].
27-
pub fn is_left(&self) -> bool {
27+
pub fn is_just_left(&self) -> bool {
2828
match *self {
2929
Left(_) => true,
3030
_ => false
@@ -33,7 +33,7 @@ impl<A, B> EitherOrBoth<A, B> {
3333

3434
/// If Right, return true otherwise, return false.
3535
/// Exclusive version of [`has_right`].
36-
pub fn is_right(&self) -> bool {
36+
pub fn is_just_right(&self) -> bool {
3737
match *self {
3838
Right(_) => true,
3939
_ => false
@@ -42,7 +42,7 @@ impl<A, B> EitherOrBoth<A, B> {
4242

4343
/// If Right, return true otherwise, return false.
4444
/// Equivalent to `self.as_ref().both().is_some()`.
45-
pub fn is_both(&self) -> bool {
45+
pub fn is_just_both(&self) -> bool {
4646
self.as_ref().both().is_some()
4747
}
4848

0 commit comments

Comments
 (0)