strip leading dots from copyright statements
This commit is contained in:
parent
656c31c862
commit
6473ff150f
1 changed files with 9 additions and 0 deletions
|
@ -42,6 +42,7 @@ pub(crate) struct License {
|
|||
impl License {
|
||||
fn simplify(&mut self) {
|
||||
self.remove_copyright_prefixes();
|
||||
self.remove_trailing_dots();
|
||||
self.copyright.sort();
|
||||
self.copyright.dedup();
|
||||
}
|
||||
|
@ -62,4 +63,12 @@ impl License {
|
|||
*copyright = stripped.into();
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_trailing_dots(&mut self) {
|
||||
for copyright in &mut self.copyright {
|
||||
if copyright.ends_with('.') {
|
||||
*copyright = copyright.trim_end_matches('.').to_string();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue