-
Notifications
You must be signed in to change notification settings - Fork 95
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
Avoid new lints in 1.81.0 #337
Commits on Sep 23, 2024
-
ci: Update the 'recent hardcoded version' to 1.81
This is used for clippy lints.
Configuration menu - View commit details
-
Copy full SHA for dd71956 - Browse repository at this point
Copy the full SHA dd71956View commit details -
build: Avoid check-cfg lint in 1.81.0
Config names are now validated at compile time: https://blog.rust-lang.org/2024/05/06/check-cfg.html
Configuration menu - View commit details
-
Copy full SHA for 98c97c8 - Browse repository at this point
Copy the full SHA 98c97c8View commit details -
Rename ./cargo/config to .cargo/config.toml
This avoids the following warning: ``` warning: `/Users/nicholas/git/slog.org/slog/.cargo/config` is deprecated in favor of `config.toml` note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` ``` Since our MSRV is currently 1.49, we can safely make this change without needing a system link.
Configuration menu - View commit details
-
Copy full SHA for 24a2e99 - Browse repository at this point
Copy the full SHA 24a2e99View commit details -
test_edition2018: Explicitly specify edition = "2018"
Avoids a cargo warning
Configuration menu - View commit details
-
Copy full SHA for 5004dc9 - Browse repository at this point
Copy the full SHA 5004dc9View commit details -
Remove unused
extern crate
declarationsThese declarations are not needed. This avoids the #[deny(unused_extern_crates)] lint, implied by #[deny(rust_2018_idioms)] This error only occurs when the `nested-values` feature is enabled. This error also seems to only occur on new versions (ex. 1.72 is fine). Switch #[deny(rust_2018_idioms)] to #[warn(...)] to avoid unnecessary build failures in the future.
Configuration menu - View commit details
-
Copy full SHA for c0b05f6 - Browse repository at this point
Copy the full SHA c0b05f6View commit details -
Unconditionally import from alloc/core
Instead of doing this: ``` #[cfg(not(feature = "std"))] use alloc::borrow::Cow; #[cfg(feature = "std")] use std::borrow::Cow; ``` Just unconditionally import from alloc: ``` use alloc::borrow::Cow; ``` Enable #[warn(clippy::std_instead_of_alloc, clippy::std_instead_of_core)] to warn about these imports in the future. Conditionally declare #[no_std] if and only if not(cfg(feature = "std")) This is cleaner and avoids an `extern crate std` declaration, but semantically there should be no difference.
Configuration menu - View commit details
-
Copy full SHA for 7554cb9 - Browse repository at this point
Copy the full SHA 7554cb9View commit details -
doc: Fix "lazy continuation" in slog::Logger
This is a mistake in markdown syntax, caught by a clippy lint: https://rust-lang.github.io/rust-clippy/rust-1.81.0/index.html#/doc_lazy_continuation
Configuration menu - View commit details
-
Copy full SHA for 4e24c23 - Browse repository at this point
Copy the full SHA 4e24c23View commit details