Skip to content

Commit 7bc5c4c

Browse files
authored
Move large_futures config to Cargo.toml; deny in more crates. (#4521)
## Motivation Large futures increase the risk of stack overflows, which is why we `#[deny(clippy::large_futures)]` in several places. However, this covers only a small fraction of the code. ## Proposal Move the lint config to `Cargo.toml` and use workspace configuration in other crates. Fix large future warnings in some places. ## Test Plan CI ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent fc32fb2 commit 7bc5c4c

File tree

47 files changed

+496
-424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+496
-424
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,3 +357,6 @@ branch = "post-message"
357357

358358
[workspace.metadata.spellcheck]
359359
config = "spellcheck-cfg.toml"
360+
361+
[workspace.lints.clippy]
362+
large_futures = "deny"

linera-base/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ license.workspace = true
1111
repository.workspace = true
1212
version.workspace = true
1313

14+
[lints]
15+
workspace = true
16+
1417
[features]
1518
metrics = ["prometheus"]
1619
reqwest = ["dep:reqwest"]

linera-base/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//! applications (compiled from Rust to Wasm).
77
88
#![deny(missing_docs)]
9-
#![deny(clippy::large_futures)]
109
#![allow(async_fn_in_trait)]
1110

1211
use std::fmt;

linera-chain/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ license.workspace = true
1111
repository.workspace = true
1212
version.workspace = true
1313

14+
[lints]
15+
workspace = true
16+
1417
[features]
1518
metrics = ["prometheus", "linera-views/metrics", "linera-execution/metrics"]
1619
test = [

linera-chain/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
//! This module manages the state of a Linera chain, including cross-chain communication.
55
6-
#![deny(clippy::large_futures)]
7-
86
pub mod block;
97
mod certificate;
108

linera-client/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! This module provides a convenient library for writing a Linera client application.
55
66
#![recursion_limit = "256"]
7-
#![deny(clippy::large_futures)]
87
#![allow(async_fn_in_trait)]
98

109
pub mod chain_listener;

linera-core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ license.workspace = true
1111
repository.workspace = true
1212
version.workspace = true
1313

14+
[lints]
15+
workspace = true
16+
1417
[features]
1518
wasmer = ["linera-execution/wasmer", "linera-storage/wasmer"]
1619
wasmtime = ["linera-execution/wasmtime", "linera-storage/wasmtime"]

linera-core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//! This module defines the core Linera protocol.
66
77
#![recursion_limit = "256"]
8-
#![deny(clippy::large_futures)]
98

109
mod chain_worker;
1110
pub mod client;

linera-ethereum/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ license.workspace = true
1111
repository.workspace = true
1212
version.workspace = true
1313

14+
[lints]
15+
workspace = true
16+
1417
[package.metadata.docs.rs]
1518
features = ["ethereum"]
1619

linera-execution/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ license.workspace = true
1111
repository.workspace = true
1212
version.workspace = true
1313

14+
[lints]
15+
workspace = true
16+
1417
[features]
1518
test = ["tokio/macros", "linera-base/test", "linera-views/test", "proptest"]
1619
revm = [

0 commit comments

Comments
 (0)