In preparation for improvements on the lockfile and caching topics, I refactored most of the lock module and some other things I spotted in various modules.
More idiomatic Rust syntax
Better handling of PathBuf in various locations
Lock file is now sorted for minimizing git diffs when updating it
In case a dependency is added again but was already present in the lock file, the new data will replace the existing data inside the lock file
Changed the parameters to some functions for clarity
Breaking changes
janitor::healthcheck_dependency now takes a reference to Dependency instead of name and version
janitor::cleanup_dependency now takes a reference to Dependency instead of name and version, and a CleanupParams struct as second argument instead of two booleans
lock::write_lock now takes an enum as second parameter to replace the bool
In preparation for improvements on the lockfile and caching topics, I refactored most of the
lock
module and some other things I spotted in various modules.PathBuf
in various locationsBreaking changes
janitor::healthcheck_dependency
now takes a reference toDependency
instead of name and versionjanitor::cleanup_dependency
now takes a reference toDependency
instead of name and version, and aCleanupParams
struct as second argument instead of two booleanslock::write_lock
now takes an enum as second parameter to replace thebool