Skip to content

Commit

Permalink
Add just infix to EitherOrBoth is_variant methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-D-coder committed Dec 31, 2018
1 parent 9e4bec3 commit f5bfc64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/either_or_both.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<A, B> EitherOrBoth<A, B> {

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

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

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

Expand Down

0 comments on commit f5bfc64

Please sign in to comment.