cossacklabs / themis

Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.
https://www.cossacklabs.com/themis
Apache License 2.0
1.85k stars 143 forks source link

Fix clippy and fmt issues #1039

Closed iamnotacake closed 9 months ago

iamnotacake commented 9 months ago

New clippy, new issues that make working code fail CI checks. Again.

Fixed clippy issues with cargo clippy --fix --all-targets, the formatted with cargo fmt.

Only cosmetic changes, most of them are outside of wrapper, i.e. in tests and benchmarks.

Update MSRV to 1.60 since our dependency zeroize now requires it.

Freeze two more dev deps regex and memchr, dependencies of env_logger used in Rust Themis tests.

Checklist

vixentael commented 9 months ago

Uh..


error: package `zeroize v1.7.0` cannot be built because it requires rustc 1.60 or newer, while the currently active rustc version is 1.58.1```
iamnotacake commented 9 months ago

error: package zeroize v1.7.0 cannot be built because it requires rustc 1.60 or newer

Well, there are two-and-a-half possible solutions: 1) Simply freeze zeroize version like I did with some other test deps that require newer compiler; basically, it's all about tests, and Themis itself does not require newer compiler 2) Update MSRV to 1.60 (released on April 2022 btw) and solve this issue 2.5) Update MSRV even more (something like 1.63?) to also remove other frozen deps, solve all issues until some deps will update again and will require even newer toolchain, but that's in future

vixentael commented 9 months ago

i vote for (1), @Lagovas WDYT?

Lagovas commented 9 months ago

I vote for both cases. Freeze and update, because I see, that a lot of dependencies upgraded their dependencies (it's 3th or 4th issue like that0