Skip to content

Conversation

hinto-janai
Copy link
Contributor

What

  • Transfers some existing crate-level lints into the workspace Cargo.toml
  • Removes redundant crate-level lints
  • Opts those crates into the workspace lints + fixes errors

Where

Crates affected:

  • rpc/{interface,json-rpc,types}
  • storage/{blockchain,database,txpool}
  • helper/
  • types/

@github-actions github-actions bot added A-dependency Area: Related to dependencies, or changes to a Cargo.{toml,lock} file. A-workspace Area: Changes to a root workspace file or general repo file. A-storage Area: Related to storage. A-helper Area: Related to cuprate-helper. A-types Area: Related to types. A-rpc Area: Related to RPC. labels Sep 1, 2024
@hinto-janai hinto-janai mentioned this pull request Sep 1, 2024
27 tasks
@hinto-janai hinto-janai marked this pull request as ready for review September 2, 2024 01:23
@hinto-janai hinto-janai requested a review from Boog900 September 2, 2024 01:23
Comment on lines 43 to 45
#[allow(clippy::module_inception)]
mod config;
pub use config::{Config, ConfigBuilder, ReaderThreads};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one seems like a mistake, I think I did this when I moved ReaderThreads, we could move the config sub-module into this module.

Comment on lines 3 to 4
// See `cuprate-database` for reasoning.
clippy::significant_drop_tightening
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: tabs used here

Comment on lines 3 to 15
// This lint is allowed because the following
// code exists a lot in this crate:
//
// ```rust
// let env_inner = env.env_inner();
// let tx_rw = env_inner.tx_rw()?;
// OpenTables::create_tables(&env_inner, &tx_rw)?;
// ```
//
// Rust thinks `env_inner` can be dropped earlier
// but it cannot, we need it for the lifetime of
// the database transaction + tables.
clippy::significant_drop_tightening
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabs and spaces mixed here

Comment on lines 3 to 4
// See `cuprate-database` for reasoning.
clippy::significant_drop_tightening
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

@hinto-janai hinto-janai requested a review from Boog900 September 2, 2024 17:05
@Boog900 Boog900 merged commit eead49b into Cuprate:main Sep 2, 2024
6 checks passed
@hinto-janai hinto-janai deleted the lint branch September 2, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependency Area: Related to dependencies, or changes to a Cargo.{toml,lock} file. A-helper Area: Related to cuprate-helper. A-rpc Area: Related to RPC. A-storage Area: Related to storage. A-types Area: Related to types. A-workspace Area: Changes to a root workspace file or general repo file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants