enable unused_lifetimes lint

This commit is contained in:
Charles Hall 2024-05-12 14:54:48 -07:00
parent 5d5e28770b
commit a78bf8f50b
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
8 changed files with 11 additions and 10 deletions

View file

@ -11,6 +11,7 @@ unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "warn" unsafe_op_in_unsafe_fn = "warn"
unused_extern_crates = "warn" unused_extern_crates = "warn"
unused_import_braces = "warn" unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn" unused_macro_rules = "warn"
unused_qualifications = "warn" unused_qualifications = "warn"

View file

@ -1206,7 +1206,7 @@ async fn validate_and_add_event_id(
Ok((event_id, value)) Ok((event_id, value))
} }
pub(crate) async fn invite_helper<'a>( pub(crate) async fn invite_helper(
sender_user: &UserId, sender_user: &UserId,
user_id: &UserId, user_id: &UserId,
room_id: &RoomId, room_id: &RoomId,

View file

@ -156,7 +156,7 @@ impl KvTree for RocksDbEngineTree<'_> {
Ok(()) Ok(())
} }
fn insert_batch<'a>(&self, iter: &mut dyn Iterator<Item = (Vec<u8>, Vec<u8>)>) -> Result<()> { fn insert_batch(&self, iter: &mut dyn Iterator<Item = (Vec<u8>, Vec<u8>)>) -> Result<()> {
let writeoptions = rocksdb::WriteOptions::default(); let writeoptions = rocksdb::WriteOptions::default();
for (key, value) in iter { for (key, value) in iter {
self.db self.db
@ -230,7 +230,7 @@ impl KvTree for RocksDbEngineTree<'_> {
Ok(new) Ok(new)
} }
fn increment_batch<'a>(&self, iter: &mut dyn Iterator<Item = Vec<u8>>) -> Result<()> { fn increment_batch(&self, iter: &mut dyn Iterator<Item = Vec<u8>>) -> Result<()> {
let readoptions = rocksdb::ReadOptions::default(); let readoptions = rocksdb::ReadOptions::default();
let writeoptions = rocksdb::WriteOptions::default(); let writeoptions = rocksdb::WriteOptions::default();

View file

@ -197,7 +197,7 @@ impl KvTree for SqliteTable {
Ok(()) Ok(())
} }
fn insert_batch<'a>(&self, iter: &mut dyn Iterator<Item = (Vec<u8>, Vec<u8>)>) -> Result<()> { fn insert_batch(&self, iter: &mut dyn Iterator<Item = (Vec<u8>, Vec<u8>)>) -> Result<()> {
let guard = self.engine.write_lock(); let guard = self.engine.write_lock();
guard.execute("BEGIN", [])?; guard.execute("BEGIN", [])?;
@ -211,7 +211,7 @@ impl KvTree for SqliteTable {
Ok(()) Ok(())
} }
fn increment_batch<'a>(&self, iter: &mut dyn Iterator<Item = Vec<u8>>) -> Result<()> { fn increment_batch(&self, iter: &mut dyn Iterator<Item = Vec<u8>>) -> Result<()> {
let guard = self.engine.write_lock(); let guard = self.engine.write_lock();
guard.execute("BEGIN", [])?; guard.execute("BEGIN", [])?;

View file

@ -3,7 +3,7 @@ use ruma::RoomId;
use crate::{database::KeyValueDatabase, service, services, utils, Result}; use crate::{database::KeyValueDatabase, service, services, utils, Result};
impl service::rooms::search::Data for KeyValueDatabase { impl service::rooms::search::Data for KeyValueDatabase {
fn index_pdu<'a>(&self, shortroomid: u64, pdu_id: &[u8], message_body: &str) -> Result<()> { fn index_pdu(&self, shortroomid: u64, pdu_id: &[u8], message_body: &str) -> Result<()> {
let mut batch = message_body let mut batch = message_body
.split_terminator(|c: char| !c.is_alphanumeric()) .split_terminator(|c: char| !c.is_alphanumeric())
.filter(|s| !s.is_empty()) .filter(|s| !s.is_empty())

View file

@ -49,7 +49,7 @@ impl service::rooms::state::Data for KeyValueDatabase {
.collect() .collect()
} }
fn set_forward_extremities<'a>( fn set_forward_extremities(
&self, &self,
room_id: &RoomId, room_id: &RoomId,
event_ids: Vec<OwnedEventId>, event_ids: Vec<OwnedEventId>,

View file

@ -11,7 +11,7 @@ pub(crate) struct Service {
impl Service { impl Service {
#[tracing::instrument(skip(self))] #[tracing::instrument(skip(self))]
pub(crate) fn index_pdu<'a>( pub(crate) fn index_pdu(
&self, &self,
shortroomid: u64, shortroomid: u64,
pdu_id: &[u8], pdu_id: &[u8],

View file

@ -199,7 +199,7 @@ impl Service {
/// ///
/// Returns pdu id /// Returns pdu id
#[tracing::instrument(skip(self, pdu, pdu_json, leaves))] #[tracing::instrument(skip(self, pdu, pdu_json, leaves))]
pub(crate) async fn append_pdu<'a>( pub(crate) async fn append_pdu(
&self, &self,
pdu: &PduEvent, pdu: &PduEvent,
mut pdu_json: CanonicalJsonObject, mut pdu_json: CanonicalJsonObject,
@ -1007,7 +1007,7 @@ impl Service {
/// Append the incoming event setting the state snapshot to the state from the /// Append the incoming event setting the state snapshot to the state from the
/// server that sent the event. /// server that sent the event.
#[tracing::instrument(skip_all)] #[tracing::instrument(skip_all)]
pub(crate) async fn append_incoming_pdu<'a>( pub(crate) async fn append_incoming_pdu(
&self, &self,
pdu: &PduEvent, pdu: &PduEvent,
pdu_json: CanonicalJsonObject, pdu_json: CanonicalJsonObject,