Use Rust's 1.74 cargo lint section (#1006)

https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html
This commit is contained in:
Yuri Astrakhan 2023-11-16 19:29:25 -05:00 committed by GitHub
parent e72f53d9ef
commit d8e386fb0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 13 deletions

View File

@ -10,6 +10,17 @@ rust-version = "1.65"
readme = "README.md"
homepage = "https://martin.maplibre.org/"
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
pedantic = "warn"
derive_partial_eq_without_eq = "allow"
implicit_hasher = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
[workspace.dependencies]
actix-cors = "0.6"
actix-http = "3"

View File

@ -1,3 +1,5 @@
lints.workspace = true
[package]
name = "martin-tile-utils"
version = "0.1.4"

View File

@ -211,7 +211,7 @@ mod tests {
#[test]
fn test_data_format_webp() {
assert_eq!(detect("./fixtures/dc.webp"), info(Webp, Internal));
assert_eq!(TileInfo::detect(br#"RIFF"#), None);
assert_eq!(TileInfo::detect(br"RIFF"), None);
}
#[test]

View File

@ -1,3 +1,5 @@
lints.workspace = true
[package]
name = "martin"
# Once the release is published with the hash, update https://github.com/maplibre/homebrew-martin

View File

@ -1,13 +1,4 @@
#![doc = include_str!("../README.md")]
#![forbid(unsafe_code)]
#![warn(clippy::pedantic)]
// Bounds struct derives PartialEq, but not Eq,
// so all containing types must also derive PartialEq without Eq
#![allow(clippy::derive_partial_eq_without_eq)]
#![allow(clippy::implicit_hasher)]
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::missing_panics_doc)]
#![allow(clippy::module_name_repetitions)]
pub mod args;
mod config;

View File

@ -52,3 +52,16 @@ path = "src/lib.rs"
name = "mbtiles"
path = "src/bin/main.rs"
required-features = ["cli"]
# Lints inheritance from workspace is not yet supported
# Copy/pasting the list, modifying the `unsafe_code` requirement
[lints.rust]
unsafe_code = "allow"
[lints.clippy]
pedantic = "warn"
derive_partial_eq_without_eq = "allow"
implicit_hasher = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"

View File

@ -1,5 +1,4 @@
#![doc = include_str!("../README.md")]
#![allow(clippy::missing_errors_doc)]
mod copier;
pub use copier::{CopyDuplicateMode, MbtilesCopier};

View File

@ -1,5 +1,3 @@
#![allow(clippy::missing_errors_doc)]
use std::ffi::OsStr;
use std::fmt::{Display, Formatter};
use std::path::Path;