-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: further separate CLI logic from the API related functionali…
…ty (see #117) (#124) * refactor: use `std::ops::Not::not` instead of custom `is_false` function * refactor: further separate API logic from CLI, and create submodules for each subcommand * fix: fmt * fix: nightly `rustfmt` warning: the `version` option is deprecated. Use `style_edition` instead. * fix: fmt * refactor: `ProcessCommand` -> `process::Command` * fix: remove unused imports * refactor: make link more readable for CLI * fix: `clippy` and `doc` warnings * chore: bump minimum rust version * fix: misc CI issues * feat: use `enum_dispatch` to avoid needing to manually call `cmd.execute` for each variant of `Command` * refactor: avoid cloning request input string * refactor: use `Cow<'static, str>` instead of `String` for `check::Request.text` * chore(lib): adding Cow * refactor: use `Cow<'source, str>` when not compiling with the `cli` feature Required cloning structs and methods from `api::check` to separate out the `clap` functionality, as `clap` wouldn't support the lifetime without it being `'static` * fix: remove unnecessary clone of `split_pattern` * refactor: use `Cow<'source, str>` for text referenced by `ResponseWithContext` * Update CI.yml * Update README.md Co-authored-by: Jérome Eertmans <[email protected]> * Update benches/benchmarks/check_texts.rs Co-authored-by: Jérome Eertmans <[email protected]> * Update benches/benchmarks/check_texts.rs Co-authored-by: Jérome Eertmans <[email protected]> * Update src/api/server.rs Co-authored-by: Jérome Eertmans <[email protected]> * Update tests/match_positions.rs Co-authored-by: Jérome Eertmans <[email protected]> * fix: formatting * fix: remove unused imports * fix: remove static lifetime from `with_text` and `with_data` * fix: correct length addition and use `Cow::to_mut` * fix: satisfy `clippy` pre-commit hook --------- Co-authored-by: Jérome Eertmans <[email protected]>
- Loading branch information
1 parent
a7247e4
commit a067522
Showing
20 changed files
with
1,227 additions
and
711 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.