refactor(BreakingChange): rename method ignore to is_absent
Method `ignore` did not carry its meaning well by the way it is named. This commit renames it to `is_absent` to clearly state this method returns whether we have a breaking change.
This commit is contained in:
@@ -31,7 +31,7 @@ pub enum BreakingChange {
|
||||
}
|
||||
|
||||
impl BreakingChange {
|
||||
pub fn ignore(&self) -> bool {
|
||||
pub fn is_absent(&self) -> bool {
|
||||
matches!(self, BreakingChange::No)
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ impl ConventionalCommit {
|
||||
pub fn first_line_len(&self) -> usize {
|
||||
self.commit_type.len()
|
||||
+ self.scope.header_segment_len()
|
||||
+ if self.breaking_change.ignore() { 0 } else { 1 }
|
||||
+ if self.breaking_change.is_absent() { 0 } else { 1 }
|
||||
+ 2 // ": "
|
||||
+ self.description.len()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user