Skip to content

Commit

Permalink
use new lints section
Browse files Browse the repository at this point in the history
  • Loading branch information
extrawurst committed Jan 5, 2024
1 parent 51e1a22 commit 120892d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 32 deletions.
17 changes: 11 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
[workspace]
members=[
"ip2country",
"ip2country-service",
"ip2country-bench"
]
members = ["ip2country", "ip2country-service", "ip2country-bench"]
resolver = "2"

[profile.release]
lto = true
codegen-units = 1
codegen-units = 1

[workspace.lints.rust]
unsafe_code = "forbid"

[workspace.lints.clippy]
cargo = "deny"
pedantic = "deny"
nursery = "deny"
panic = "deny"
12 changes: 6 additions & 6 deletions ip2country-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ repository = "https://github.com/extrawurst/ip2country"
readme = "README.md"
license = "MIT"
categories = ["web-programming"]
keywords = [
"web",
"ip-lookup",
"server",
]
keywords = ["web", "ip-lookup", "server"]
rust-version = "1.74"

[lints]
workspace = true

[dependencies]
ip2country = { path = "../ip2country" }
Expand All @@ -22,4 +22,4 @@ iai = { git = "https://github.com/bheisler/iai.git", rev = "58e28e940c62898a45d1

[[bench]]
name = "benchmark"
harness = false
harness = false
4 changes: 4 additions & 0 deletions ip2country-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ readme = "README.md"
license = "MIT"
categories = ["web-programming"]
keywords = ["web", "ip-lookup", "server"]
rust-version = "1.74"

[lints]
workspace = true

[dependencies]
ip2country = { path = "../ip2country", version = "0.3" }
Expand Down
7 changes: 0 additions & 7 deletions ip2country-service/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#![forbid(unsafe_code)]
#![deny(clippy::cargo)]
#![deny(clippy::pedantic)]
#![deny(clippy::nursery)]
#![deny(clippy::panic)]
#![allow(clippy::multiple_crate_versions)]

use http_body_util::Full;
use hyper::{
body::{Bytes, Incoming as IncomingBody},
Expand Down
14 changes: 7 additions & 7 deletions ip2country/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ homepage = "https://github.com/extrawurst/ip2country"
repository = "https://github.com/extrawurst/ip2country"
readme = "README.md"
license = "MIT"
categories = ["data-structures","parser-implementations","web-programming"]
keywords = [
"web",
"ip-lookup",
"server",
]
categories = ["data-structures", "parser-implementations", "web-programming"]
keywords = ["web", "ip-lookup", "server"]
rust-version = "1.74"

[lints]
workspace = true

[dependencies]
static_assertions = "1.1"
Expand All @@ -28,4 +28,4 @@ name = "benchmarks"
harness = false

[lib]
bench = false
bench = false
6 changes: 0 additions & 6 deletions ip2country/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#![forbid(unsafe_code)]
#![deny(clippy::cargo)]
#![deny(clippy::pedantic)]
#![deny(clippy::nursery)]
#![deny(clippy::panic)]
#![allow(clippy::multiple_crate_versions)]
//TODO:
// #![deny(clippy::result_unwrap_used)]

Expand Down

0 comments on commit 120892d

Please sign in to comment.