diff --git a/core/fast_lock.rs b/core/fast_lock.rs index 96a823699..8abda6a17 100644 --- a/core/fast_lock.rs +++ b/core/fast_lock.rs @@ -45,7 +45,7 @@ impl SpinLock { } } - pub fn lock(&self) -> SpinLockGuard { + pub fn lock(&self) -> SpinLockGuard<'_, T> { while self.locked.swap(true, Ordering::Acquire) { std::hint::spin_loop(); } diff --git a/core/incremental/operator.rs b/core/incremental/operator.rs index 677d26aa4..7c402db93 100644 --- a/core/incremental/operator.rs +++ b/core/incremental/operator.rs @@ -2050,13 +2050,13 @@ impl AggregateOperator { .join(",") } - fn seek_key_from_str(&self, group_key_str: &str) -> SeekKey { + fn seek_key_from_str(&self, group_key_str: &str) -> SeekKey<'_> { // Calculate the composite key for seeking let key_i64 = self.generate_storage_key(group_key_str); SeekKey::TableRowId(key_i64) } - fn seek_key(&self, row: HashableRow) -> SeekKey { + fn seek_key(&self, row: HashableRow) -> SeekKey<'_> { // Extract group key for first row let group_key = self.extract_group_key(&row.values); let group_key_str = Self::group_key_to_string(&group_key); diff --git a/core/json/mod.rs b/core/json/mod.rs index 697879edd..6209b6774 100644 --- a/core/json/mod.rs +++ b/core/json/mod.rs @@ -540,7 +540,7 @@ pub fn json_type(value: &Value, path: Option<&Value>) -> crate::Result { } } -fn json_path_from_db_value(path: &Value, strict: bool) -> crate::Result> { +fn json_path_from_db_value(path: &Value, strict: bool) -> crate::Result>> { let json_path = if strict { match path { Value::Text(t) => json_path(t.as_str())?, diff --git a/core/json/vtab.rs b/core/json/vtab.rs index 08def79ad..f1e9b705f 100644 --- a/core/json/vtab.rs +++ b/core/json/vtab.rs @@ -38,7 +38,7 @@ impl InternalVirtualTable for JsonEachVirtualTable { fn open( &self, _conn: Arc, - ) -> crate::Result>> { + ) -> crate::Result>> { Ok(Arc::new(RwLock::new(JsonEachCursor::default()))) } diff --git a/core/lib.rs b/core/lib.rs index 3171576cb..180068284 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -2475,7 +2475,7 @@ impl Statement { } } - pub fn get_column_name(&self, idx: usize) -> Cow { + pub fn get_column_name(&self, idx: usize) -> Cow<'_, str> { match self.query_mode { QueryMode::Normal => { let column = &self.program.result_columns.get(idx).expect("No column"); @@ -2489,7 +2489,7 @@ impl Statement { } } - pub fn get_column_table_name(&self, idx: usize) -> Option> { + pub fn get_column_table_name(&self, idx: usize) -> Option> { let column = &self.program.result_columns.get(idx).expect("No column"); match &column.expr { turso_parser::ast::Expr::Column { table, .. } => self diff --git a/core/storage/btree.rs b/core/storage/btree.rs index f463cd36e..e9c888e80 100644 --- a/core/storage/btree.rs +++ b/core/storage/btree.rs @@ -4633,7 +4633,7 @@ impl BTreeCursor { /// If record was not parsed yet, then we have to parse it and in case of I/O we yield control /// back. #[instrument(skip(self), level = Level::DEBUG)] - pub fn record(&self) -> Result>>> { + pub fn record(&self) -> Result>>> { if !self.has_record.get() && self.mv_cursor.is_none() { return Ok(IOResult::Done(None)); } diff --git a/core/storage/wal.rs b/core/storage/wal.rs index e4abf9785..3edf3f6d5 100644 --- a/core/storage/wal.rs +++ b/core/storage/wal.rs @@ -1638,11 +1638,11 @@ impl WalFile { WAL_HEADER_SIZE as u64 + page_offset } - fn get_shared_mut(&self) -> parking_lot::RwLockWriteGuard { + fn get_shared_mut(&self) -> parking_lot::RwLockWriteGuard<'_, WalFileShared> { self.shared.write() } - fn get_shared(&self) -> parking_lot::RwLockReadGuard { + fn get_shared(&self) -> parking_lot::RwLockReadGuard<'_, WalFileShared> { self.shared.read() }