Fix new clippy lints

This commit is contained in:
Lukas Wirth 2024-03-22 11:38:18 +01:00
parent 8e324e98a1
commit 2ae3e57c26
33 changed files with 31 additions and 42 deletions

View file

@ -1,8 +1,7 @@
//!
#![allow(clippy::type_complexity)]
#![allow(clippy::question_mark)]
#![allow(missing_docs)]
#![warn(rust_2018_idioms)]
#![warn(missing_docs)]
//! The salsa crate is a crate for incremental recomputation. It
//! permits you to define a "database" of queries with both inputs and
@ -124,9 +123,9 @@ pub struct Event {
impl Event {
/// Returns a type that gives a user-readable debug output.
/// Use like `println!("{:?}", index.debug(db))`.
pub fn debug<'me, D: ?Sized>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
pub fn debug<'me, D>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
where
D: plumbing::DatabaseOps,
D: ?Sized + plumbing::DatabaseOps,
{
EventDebug { event: self, db }
}
@ -206,9 +205,9 @@ pub enum EventKind {
impl EventKind {
/// Returns a type that gives a user-readable debug output.
/// Use like `println!("{:?}", index.debug(db))`.
pub fn debug<'me, D: ?Sized>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
pub fn debug<'me, D>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
where
D: plumbing::DatabaseOps,
D: ?Sized + plumbing::DatabaseOps,
{
EventKindDebug { kind: self, db }
}
@ -400,9 +399,9 @@ impl DatabaseKeyIndex {
/// Returns a type that gives a user-readable debug output.
/// Use like `println!("{:?}", index.debug(db))`.
pub fn debug<D: ?Sized>(self, db: &D) -> impl std::fmt::Debug + '_
pub fn debug<D>(self, db: &D) -> impl std::fmt::Debug + '_
where
D: plumbing::DatabaseOps,
D: ?Sized + plumbing::DatabaseOps,
{
DatabaseKeyIndexDebug { index: self, db }
}