Avatar for the jeertmans user
jeertmans
languagetool-rust
BlogDocsChangelog

chore(lib): fully refactor the library for v3

#117
Comparing
v3
(
1665a9d
) with
main
(
a217b40
)
CodSpeed Performance Gauge
-6%
Improvements
0
Regressions
0
Untouched
6
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

large
benches/benchmarks/check_texts.rs::checks::bench_split::split::large
CodSpeed Performance Gauge
-4%
126.4 ms
132.2 ms
medium
benches/benchmarks/check_texts.rs::checks::bench_split::split::medium
CodSpeed Performance Gauge
-6%
112.9 ms
119.5 ms
small
benches/benchmarks/check_texts.rs::checks::bench_split::split::small
CodSpeed Performance Gauge
-6%
109.2 ms
116.1 ms
large
benches/benchmarks/check_texts.rs::checks::bench_basic::basic::large
CodSpeed Performance Gauge
-6%
109.1 ms
115.9 ms
small
benches/benchmarks/check_texts.rs::checks::bench_basic::basic::small
CodSpeed Performance Gauge
-6%
108.5 ms
115.4 ms
medium
benches/benchmarks/check_texts.rs::checks::bench_basic::basic::medium
CodSpeed Performance Gauge
-6%
108.7 ms
115.9 ms

Commits

Click on a commit to change the comparison range
Base
main
a217b40
-6%
refactor: further separate CLI logic from the API related functionality (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 <jeertmans@icloud.com> * Update benches/benchmarks/check_texts.rs Co-authored-by: Jérome Eertmans <jeertmans@icloud.com> * Update benches/benchmarks/check_texts.rs Co-authored-by: Jérome Eertmans <jeertmans@icloud.com> * Update src/api/server.rs Co-authored-by: Jérome Eertmans <jeertmans@icloud.com> * Update tests/match_positions.rs Co-authored-by: Jérome Eertmans <jeertmans@icloud.com> * 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 <jeertmans@icloud.com>
a067522
1 month ago
by Rolv-Apneseth
0%
refactor: remove unnecessary code duplication from `cli/check`
a90bd15
1 month ago
by Rolv-Apneseth
0%
ci: include newer versions of `languagetool` in tests (#126) * ci: include newer versions of `languagetool` in tests * tests: debug errors with server testing * ci: `--no-capture` for testing library code, for easier debugging failing CI tests
ccb494a
1 month ago
by Rolv-Apneseth
0%
refactor(lib): consolidate `reqwest` errors (#125) * refactor: consolidate `Error::ResponseDecode` and `Error::ResponseEncode` into just `Error::Reqwest` * tests: `Error::Reqwest` * tests: check that an invalid request is returned when the input is too long when checking either text or annotated data
1665a9d
26 days ago
by Rolv-Apneseth
Home Terms PrivacyDocs