mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-15 00:45:02 +01:00
allow ignoring files
This commit is contained in:
parent
4efb617ae9
commit
729deb5110
2 changed files with 23 additions and 0 deletions
|
|
@ -79,6 +79,18 @@ impl Minimizer {
|
|||
}
|
||||
})
|
||||
.filter(|entry| entry.path().extension() == Some(OsStr::new("rs")))
|
||||
.filter(|entry| {
|
||||
if options
|
||||
.ignore_file
|
||||
.iter()
|
||||
.any(|ignored| entry.path().starts_with(ignored))
|
||||
{
|
||||
info!("Ignoring file: {}", entry.path().display());
|
||||
false
|
||||
} else {
|
||||
true
|
||||
}
|
||||
})
|
||||
.map(|entry| SourceFile {
|
||||
path: entry.into_path(),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue