Narawit Rakket
31d3701cae
chore: reduce MSRV to 1.62.0
2022-08-12 18:06:57 +05:30
Narawit Rakket
8c1089ed57
chore: bump minimum Rust version to 1.62.1 (latest)
2022-08-12 18:06:57 +05:30
Narawit Rakket
8d08fb63d1
refactor: use default attribute for enum
...
Use the new feature from Rust 1.62 to make code more concise
https://blog.rust-lang.org/2022/06/30/Rust-1.62.0.html#default-enum-variants
2022-08-12 18:06:57 +05:30
Kian-Meng Ang
d05b2acd20
Fix typos and markdowns
...
Found via these commands:
codespell -L crate,complies
markdownlint README.md docs/lsd.md --disable MD034 MD013 MD033 MD025
2022-08-12 01:29:06 +08:00
Narawit Rakket
1553aafe9d
refactor: simplify panic message in unreachable!
...
Mention `clap` in the comment instead because this information is
useful for developers but can confuse users
2022-08-07 19:53:37 +05:30
Narawit Rakket
685d5a6c2f
refactor: do not mention clap
in panic message
...
Mention `clap` in the comment instead because this information is
useful for developers but can confuse users
2022-08-07 19:53:08 +05:30
Narawit Rakket
c239291ca8
docs: fix a small typo in comment
2022-08-07 19:53:08 +05:30
Narawit Rakket
4f100aac78
refactor: implement Configurable
for blocks
2022-08-07 19:53:08 +05:30
Narawit Rakket
b5ad6d0d85
chore(workflow): run clippy on all tests
2022-08-02 09:31:24 +05:30
Narawit Rakket
1769bdb856
refactor: run clippy --fix
2022-08-02 09:31:24 +05:30
Narawit Rakket
425e515e48
chore(workflow): bump Rust MSRV to 1.62.1 (latest)
2022-07-31 18:29:22 +05:30
Narawit Rakket
1d860fd6e8
refactor: add more info in unreachable!
message
2022-07-31 18:29:22 +05:30
Narawit Rakket
cc8799a91e
refactor(flags): refactor parsing arguments
...
- Make code more idiomatic and readable and have the same pattern
- Use `unreachable` to clearly show internal logic error
- Rename function `from_str` to `from_arg_str` to make it more specific
2022-07-31 18:29:22 +05:30
Abin Simon
2bc55dd608
Fix icons against comments in icon.rs
2022-07-22 15:39:18 +05:30
Narawit Rakket
946f243066
refactor: simplify constant string
2022-07-13 18:57:18 +05:30
Narawit Rakket
8a4316df9f
refactor: change input type from String
to AsRef<Path>
...
This improve flexibility and reduce `String` allocation
2022-07-13 18:57:18 +05:30
Narawit Rakket
55c2ef1a7b
refactor: simplify control flow
2022-07-13 18:57:18 +05:30
Marcin Puc
6370bdeaff
docs(readme): add repology badge
2022-07-11 09:16:53 +05:30
Narawit Rakket
2600644d6a
refactor(test): remove unnecessary reference
2022-07-10 16:05:39 +05:30
Narawit Rakket
b247650d37
docs(readme): make example config file collapsible
2022-07-10 12:31:19 +05:30
Narawit Rakket
201f6b2a22
refactor: replace if let
with map_err
2022-07-09 17:27:32 +05:30
Narawit Rakket
73b14ab8c4
refactor: merge match
branches with the same output
2022-07-09 17:27:32 +05:30
Narawit Rakket
853fcb6fbf
refactor: remove unnecessary reference
...
`String` can be compared with `&str`
2022-07-09 17:27:32 +05:30
Narawit Rakket
5ade7b247f
refactor: replace simple match
with if
2022-07-09 17:27:32 +05:30
Narawit Rakket
20f578bbe6
refactor(validation): simplify pattern matching
2022-07-09 17:27:32 +05:30
Marcin Puc
8172f07010
docs: add Void Linux install instructions
2022-07-07 21:39:38 +05:30
OldWorldOrdr
54f177f092
add .profile icon
2022-07-06 23:08:45 +05:30
OldWorldOrdr
b21ed9ef5a
fix stupid mistake
2022-07-06 23:08:45 +05:30
OldWorldOrdr
5821464ee0
add .git-credentials
2022-07-06 23:08:45 +05:30
Abin Simon
5431651631
Bump crossterm to 0.24.0
2022-07-05 13:07:00 +05:30
Abin Simon
cc859b6fe8
Don't pin bitflags
...
This was initially pinned because of clap-rs/clap/issues/2691, but we
use a newer version as MSRV as of now in CI.
2022-07-05 13:07:00 +05:30
Narawit Rakket
b35b09817e
refactor(test): initialize variable with functional update syntax
...
Fix clippy lint
https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
2022-07-04 22:54:01 +05:30
Narawit Rakket
2c540f17a0
refactor(test): replace match
in assert!
with matches!
...
Fix clippy lint
https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
2022-07-04 22:54:01 +05:30
Narawit Rakket
e6d30ab081
refactor(test): replace assert_eq
comparing bool
with assert
...
Fix clippy lint
https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
2022-07-04 22:54:01 +05:30
Narawit Rakket
c17938224b
refactor(test): run cargo clippy --fix
...
Fix the following `clippy` lints
* https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
* https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
* https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
* https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
* https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
2022-07-04 22:54:01 +05:30
Narawit Rakket
fd12e4a144
refactor: replace deprecating usize::max_value()
with usize::MAX
2022-07-03 09:38:09 +05:30
Narawit Rakket
5bd705b4d2
refactor(test): remove unnecessary as_str()
in tests
...
The reason is that `String` can be compared to `&str`
2022-07-03 09:36:01 +05:30
Narawit Rakket
91ffaeadb2
refactor(size): various refactoring
...
* remove unused enum `Unit::None`
* simplify logic with `match` statement
* use constant variable instead of magic number
2022-07-03 09:35:22 +05:30
Narawit Rakket
88974948bc
refactor: remove unnecessary lifetime annotation
2022-07-01 16:01:26 +05:30
Narawit Rakket
641e2ab256
refactor(display): various minor refactoring
...
* use `if let` syntax
* replace basic `matches!` macro with `==`
* use `format!` macro to create a `String`
2022-07-01 13:22:09 +05:30
Narawit Rakket
997dd9fa1a
refactor(color): improve readability and flexibility
...
* Change parameter type of `colorize` function from `String` to generic type `Into<String>`
2022-06-30 19:40:05 +05:30
Narawit Rakket
a09896b3cd
refactor(meta): improve readability and maintainability
...
* use `io::Result` to shorten the return type
* remove unnecessary reference (`&`)
* replace multiple `if` with `&&` operator
2022-06-29 19:25:56 +05:30
Narawit Rakket
2ffb59cc9e
chore(permission): correct panic message
...
Co-authored-by: Abin Simon <abinsimon10@gmail.com>
2022-06-15 14:59:46 +05:30
Narawit Rakket
ffa5daa3c5
refactor(permission): replace unwrap with expect
2022-06-15 14:59:46 +05:30
Narawit Rakket
eea9dcaa26
perf: improve permission rendering
2022-06-15 14:59:46 +05:30
Narawit Rakket
660cae2143
refactor: remove unnecessary use of vec! macro
2022-06-15 09:15:06 +05:30
Narawit Rakket
0562dee61b
refactor(blocks): get_header return &str instead of String
2022-06-13 21:36:25 +05:30
Narawit Rakket
ffa5b2bfaf
refactor(display): remove unnecessary String clone
2022-06-13 08:32:04 +05:30
Narawit Rakket
a9bbab821e
refactor(icon): simplify matching logic
2022-06-13 08:30:56 +05:30
Narawit Rakket
db3a60968e
refactor(icon): construct icon hashmap from an array
2022-06-13 08:30:56 +05:30