-
Notifications
You must be signed in to change notification settings - Fork 16
feat: gate cli features #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
shreyasbhat0
merged 10 commits into
toon-format:main
from
jqnatividad:39-gate-cli-deps-behind-cli-feature
Dec 20, 2025
Merged
feat: gate cli features #41
shreyasbhat0
merged 10 commits into
toon-format:main
from
jqnatividad:39-gate-cli-deps-behind-cli-feature
Dec 20, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for library users who do not want the dependencies required by the cli
Contributor
|
@jqnatividad can you fix the clippy errors |
shreyasbhat0
requested changes
Dec 19, 2025
error: called `unwrap` on `result` after checking its variant with `is_ok`
--> tests/spec_fixtures.rs:84:21
|
80 | if result.is_ok() {
| ----------------- help: try: `if let Ok(<item>) = result`
...
84 | result.unwrap()
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_unwrap
= note: `-D clippy::unnecessary-unwrap` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_unwrap)]`
warning: this could be rewritten as `let...else`
--> src/utils/string.rs:103:5
|
103 | / let first = match chars.next() {
104 | | Some(c) => c,
105 | | None => return false,
106 | | };
| |______^ help: consider writing: `let Some(first) = chars.next() else { return false };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
warning: single-character string constant used as pattern
--> src/utils/string.rs:145:22
|
145 | if s.starts_with("-") {
| ^^^ help: consider using a `char`: `'-'`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `-W clippy::single-char-pattern` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::single_char_pattern)]`
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> src/utils/validation.rs:32:31
|
32 | for (key, val) in obj.iter() {
| ^^^^^^^^^^ help: to write this more concisely, try: `obj`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
= note: `-W clippy::explicit-iter-loop` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::explicit_iter_loop)]`
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> src/utils/validation.rs:38:24
|
38 | for val in arr.iter() {
| ^^^^^^^^^^ help: to write this more concisely, try: `arr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
Contributor
Author
|
Hi @shreyasbhat0 , |
Contributor
Author
|
FYI @shreyasbhat0 , I did |
Contributor
Author
|
Aahhh... it seems it needs |
Contributor
|
Yeah it needs cargo nightly fmt |
shreyasbhat0
approved these changes
Dec 20, 2025
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
for library users who do not want the dependencies required by the cli
Linked Issue
Closes #39
Description
Gate deps required for cli tool behind cli feature.
Type of Change
Changes Made
Cargo.toml changes
clifeature and group cli-related dependencies under itrequired-featurefor binlib.rs change
clifeatureTesting
Pre-submission Checklist
Breaking Changes