chore: set clippy check for const fn to warn (#15777)

This commit is contained in:
Federico Gimenez
2025-04-16 19:59:36 +02:00
committed by GitHub
parent 3bddd3cc8e
commit ddc101f863
115 changed files with 303 additions and 281 deletions

View File

@@ -38,12 +38,12 @@ pub struct CachedReads {
impl CachedReads {
/// Gets a [`DatabaseRef`] that will cache reads from the given database.
pub fn as_db<DB>(&mut self, db: DB) -> CachedReadsDBRef<'_, DB> {
pub const fn as_db<DB>(&mut self, db: DB) -> CachedReadsDBRef<'_, DB> {
self.as_db_mut(db).into_db()
}
/// Gets a mutable [`Database`] that will cache reads from the underlying database.
pub fn as_db_mut<DB>(&mut self, db: DB) -> CachedReadsDbMut<'_, DB> {
pub const fn as_db_mut<DB>(&mut self, db: DB) -> CachedReadsDbMut<'_, DB> {
CachedReadsDbMut { cached: self, db }
}