diff options
author | qkzk <qu3nt1n@gmail.com> | 2023-02-10 21:02:43 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2023-02-10 21:02:43 +0100 |
commit | b70380968ef7f8070ae8876bdc5fb2b2e0e9446c (patch) | |
tree | a6a00c135563c9762dd60d138bb655e7c1774069 /src/tree.rs | |
parent | 309733e4e297bde96dfd11c2cf588765b2eb95ca (diff) |
rename MAX_HEIGHT to REQUIRED_HEIGHT
Diffstat (limited to 'src/tree.rs')
-rw-r--r-- | src/tree.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tree.rs b/src/tree.rs index 2353925..c104704 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -114,7 +114,7 @@ impl Tree { /// It may be better to stop the recursion when too much file /// are present and the exploration is slow. pub const MAX_DEPTH: usize = 7; - pub const MAX_HEIGHT: usize = 80; + pub const REQUIRED_HEIGHT: usize = 80; /// Set the required height to a given value. /// The required height is used to stop filling the view content. @@ -136,13 +136,13 @@ impl Tree { /// Reset the required height to its default value : Self::MAX_HEIGHT /// The required height is used to stop filling the view content. pub fn reset_required_height(&mut self) { - self.required_height = Self::MAX_HEIGHT + self.required_height = Self::REQUIRED_HEIGHT } /// Decrement the required height if possible. /// The required height is used to stop filling the view content. pub fn decrease_required_height(&mut self) { - if self.required_height > Self::MAX_HEIGHT { + if self.required_height > Self::REQUIRED_HEIGHT { self.required_height -= 1; } } @@ -150,7 +150,7 @@ impl Tree { /// Decrease the required height by 10 if possible /// The required height is used to stop filling the view content. pub fn decrease_required_height_by_ten(&mut self) { - if self.required_height >= Self::MAX_HEIGHT + 10 { + if self.required_height >= Self::REQUIRED_HEIGHT + 10 { self.required_height -= 10; } } @@ -217,7 +217,7 @@ impl Tree { position, current_node, sort_kind, - required_height: Self::MAX_HEIGHT, + required_height: Self::REQUIRED_HEIGHT, }) } |