This PR adds further readability and maintainability improvements.
Summary
Add an AppTab enum to track the active tab.
Rename ConfigTOML to ConfigToml to conform to Rust RFC 430.
In UpperCamelCase, acronyms and contractions of compound words count as one word: use Uuid rather than UUID, Usize rather than USize or Stdin rather than StdIn. In snake_case, acronyms and contractions are lower-cased: is_xid_start.
Getters have been renamed to not use the get_ prefix as recommended by the Rust API Guidelines.
With a few exceptions, the get_ prefix is not used for getters in Rust code.
[...]
The get naming is used only when there is a single and obvious thing that could reasonably be gotten by a getter. For example Cell::get accesses the content of a Cell.
Clippy's suggestions for the queue module's remove() function have been applied.
❯ cargo clippy
warning: unneeded `return` statement
--> src/helpers/queue.rs:182:35
|
182 | if self.items.len() == 0 {
| ___________________________________^
183 | | return;
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#need
less_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: length comparison to zero
--> src/helpers/queue.rs:182:12
|
182 | if self.items.len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.items.
is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_
zero
= note: `#[warn(clippy::len_zero)]` on by default
warning: `kronos` (lib) generated 2 warnings
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Purpose
This PR adds further readability and maintainability improvements.
Summary
AppTab
enum to track the active tab.ConfigTOML
toConfigToml
to conform to Rust RFC 430.get_
prefix as recommended by the Rust API Guidelines.Clippy's suggestions for the
queue
module'sremove()
function have been applied.