diff options
Diffstat (limited to 'crates/shirabe-semver/src/constraint')
4 files changed, 16 insertions, 16 deletions
diff --git a/crates/shirabe-semver/src/constraint/constraint.rs b/crates/shirabe-semver/src/constraint/constraint.rs index 8db322d..f8ff04e 100644 --- a/crates/shirabe-semver/src/constraint/constraint.rs +++ b/crates/shirabe-semver/src/constraint/constraint.rs @@ -347,10 +347,10 @@ impl ConstraintInterface for Constraint { } fn get_pretty_string(&self) -> String { - if let Some(ref s) = self.pretty_string { - if !s.is_empty() { - return s.clone(); - } + if let Some(ref s) = self.pretty_string + && !s.is_empty() + { + return s.clone(); } self.__to_string() } diff --git a/crates/shirabe-semver/src/constraint/match_all_constraint.rs b/crates/shirabe-semver/src/constraint/match_all_constraint.rs index b6b2445..97ce98c 100644 --- a/crates/shirabe-semver/src/constraint/match_all_constraint.rs +++ b/crates/shirabe-semver/src/constraint/match_all_constraint.rs @@ -22,10 +22,10 @@ impl ConstraintInterface for MatchAllConstraint { } fn get_pretty_string(&self) -> String { - if let Some(ref s) = self.pretty_string { - if !s.is_empty() { - return s.clone(); - } + if let Some(ref s) = self.pretty_string + && !s.is_empty() + { + return s.clone(); } self.__to_string() } diff --git a/crates/shirabe-semver/src/constraint/match_none_constraint.rs b/crates/shirabe-semver/src/constraint/match_none_constraint.rs index 17a45bb..51e13fd 100644 --- a/crates/shirabe-semver/src/constraint/match_none_constraint.rs +++ b/crates/shirabe-semver/src/constraint/match_none_constraint.rs @@ -22,10 +22,10 @@ impl ConstraintInterface for MatchNoneConstraint { } fn get_pretty_string(&self) -> String { - if let Some(ref s) = self.pretty_string { - if !s.is_empty() { - return s.clone(); - } + if let Some(ref s) = self.pretty_string + && !s.is_empty() + { + return s.clone(); } self.__to_string() } diff --git a/crates/shirabe-semver/src/constraint/multi_constraint.rs b/crates/shirabe-semver/src/constraint/multi_constraint.rs index 29d6f5e..04e262b 100644 --- a/crates/shirabe-semver/src/constraint/multi_constraint.rs +++ b/crates/shirabe-semver/src/constraint/multi_constraint.rs @@ -270,10 +270,10 @@ impl ConstraintInterface for MultiConstraint { } fn get_pretty_string(&self) -> String { - if let Some(ref s) = self.pretty_string { - if !s.is_empty() { - return s.clone(); - } + if let Some(ref s) = self.pretty_string + && !s.is_empty() + { + return s.clone(); } self.__to_string() } |
