Mercurial > hg
diff rust/hg-core/src/dirstate_tree/dirstate_map.rs @ 51707:ec7171748350
rust: apply clippy lints
They are at most harmless and at best make the codebase more readable and
simpler.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Thu, 18 Jul 2024 13:35:39 +0200 |
parents | 532e74ad3ff6 |
children | 76c44ae8862e |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs Tue Jul 23 14:25:23 2024 +0200 +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs Thu Jul 18 13:35:39 2024 +0200 @@ -427,19 +427,14 @@ pub(super) tracked_descendants_count: u32, } -#[derive(Debug)] +#[derive(Debug, Default)] pub(super) enum NodeData { Entry(DirstateEntry), CachedDirectory { mtime: TruncatedTimestamp }, + #[default] None, } -impl Default for NodeData { - fn default() -> Self { - NodeData::None - } -} - impl NodeData { fn has_entry(&self) -> bool { matches!(self, NodeData::Entry(_))