Skip to content

Commit

Permalink
Fix formatting detail regarding spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
pjedge committed Mar 6, 2024
1 parent a11ae68 commit 4c606a0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions martian/src/mro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,20 +457,16 @@ impl MroField {
}

fn name_width(&self) -> usize {
if self.mro_filename.is_none() && self.desc.is_none() {
self.name.len() + 1 // string length + 1 space
} else {
self.name.len() // string_length
}
self.name.len()
}

fn desc_width(&self) -> usize {
match self.desc {
Some(ref desc) => {
if self.mro_filename.is_some() {
desc.len() + 3 // string length + 2 quote chars + 1 space
desc.len() + 2 // string length + 2 quote chars
} else {
desc.len() + 4 // string length + 2 quote chars + 1 comma + 1 space
desc.len() + 3 // string length + 2 quote chars + 1 comma
}
}
None => 0,
Expand Down

0 comments on commit 4c606a0

Please sign in to comment.