Skip to content

Commit 02a5b6a

Browse files
authored
clippy (#5512)
1 parent 21cec26 commit 02a5b6a

File tree

27 files changed

+48
-45
lines changed

27 files changed

+48
-45
lines changed

quickwit/quickwit-actors/src/universe.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use crate::spawn_builder::{SpawnBuilder, SpawnContext};
2828
use crate::{Actor, ActorExitStatus, Command, Inbox, Mailbox, QueueCapacity};
2929

3030
/// Universe serves as the top-level context in which Actor can be spawned.
31+
///
3132
/// It is *not* a singleton. A typical application will usually have only one universe hosting all
3233
/// of the actors but it is not a requirement.
3334
///

quickwit/quickwit-cli/src/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ struct Printer<'a> {
12381238
pub stdout: &'a mut Stdout,
12391239
}
12401240

1241-
impl<'a> Printer<'a> {
1241+
impl Printer<'_> {
12421242
pub fn print_header(&mut self, header: &str) -> io::Result<()> {
12431243
write!(&mut self.stdout, " {}", header.bright_blue())?;
12441244
Ok(())

quickwit/quickwit-cli/src/tool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ struct Printer<'a> {
841841
pub stdout: &'a mut Stdout,
842842
}
843843

844-
impl<'a> Printer<'a> {
844+
impl Printer<'_> {
845845
pub fn print_header(&mut self, header: &str) -> io::Result<()> {
846846
write!(&mut self.stdout, " {}", header.bright_blue())?;
847847
Ok(())

quickwit/quickwit-common/src/metrics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pub struct GaugeGuard<'a> {
236236
delta: i64,
237237
}
238238

239-
impl<'a> std::fmt::Debug for GaugeGuard<'a> {
239+
impl std::fmt::Debug for GaugeGuard<'_> {
240240
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
241241
self.delta.fmt(f)
242242
}
@@ -262,7 +262,7 @@ impl<'a> GaugeGuard<'a> {
262262
}
263263
}
264264

265-
impl<'a> Drop for GaugeGuard<'a> {
265+
impl Drop for GaugeGuard<'_> {
266266
fn drop(&mut self) {
267267
self.gauge.sub(self.delta)
268268
}

quickwit/quickwit-common/src/sorted_iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ impl<T> SortedIterator for T where T: Iterator + Sorted {}
106106

107107
impl<K, V> Sorted for btree_map::IntoKeys<K, V> {}
108108
impl<K, V> Sorted for btree_map::IntoValues<K, V> {}
109-
impl<'a, K, V> Sorted for btree_map::Keys<'a, K, V> {}
110-
impl<'a, K, V> Sorted for btree_map::Values<'a, K, V> {}
109+
impl<K, V> Sorted for btree_map::Keys<'_, K, V> {}
110+
impl<K, V> Sorted for btree_map::Values<'_, K, V> {}
111111
impl<K> Sorted for btree_set::IntoIter<K> {}
112-
impl<'a, K> Sorted for btree_set::Iter<'a, K> {}
112+
impl<K> Sorted for btree_set::Iter<'_, K> {}
113113

114114
/// Same as [`SortedIterator`] but for (key, value) pairs sorted by key.
115115
pub trait SortedByKeyIterator<K, V>: Iterator + Sized {
@@ -194,7 +194,7 @@ where
194194
impl<T, K, V> SortedByKeyIterator<K, V> for T where T: Iterator<Item = (K, V)> + Sorted {}
195195

196196
impl<K, V> Sorted for btree_map::IntoIter<K, V> {}
197-
impl<'a, K, V> Sorted for btree_map::Iter<'a, K, V> {}
197+
impl<K, V> Sorted for btree_map::Iter<'_, K, V> {}
198198

199199
#[cfg(test)]
200200
mod tests {

quickwit/quickwit-common/src/temp_dir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub struct Builder<'a> {
8282
num_rand_chars: usize,
8383
}
8484

85-
impl<'a> Default for Builder<'a> {
85+
impl Default for Builder<'_> {
8686
fn default() -> Self {
8787
Self {
8888
parts: Default::default(),

quickwit/quickwit-control-plane/src/indexing_scheduler/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ struct IndexingPlansDiff<'a> {
403403
pub unplanned_tasks_by_node_id: FnvHashMap<&'a str, Vec<&'a IndexingTask>>,
404404
}
405405

406-
impl<'a> IndexingPlansDiff<'a> {
406+
impl IndexingPlansDiff<'_> {
407407
pub fn has_same_nodes(&self) -> bool {
408408
self.missing_node_ids.is_empty() && self.unplanned_node_ids.is_empty()
409409
}
@@ -454,7 +454,7 @@ fn get_shard_locality_metrics(
454454
}
455455
}
456456

457-
impl<'a> fmt::Debug for IndexingPlansDiff<'a> {
457+
impl fmt::Debug for IndexingPlansDiff<'_> {
458458
fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
459459
if self.has_same_nodes() && self.has_same_tasks() {
460460
return write!(formatter, "EmptyIndexingPlansDiff");

quickwit/quickwit-directories/src/bundle_directory.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl Debug for BundleDirectory {
4949
}
5050

5151
/// Loads the split footer from a storage and path.
52+
///
5253
/// Returns (SplitFooter, BundleFooter)
5354
/// SplitFooter [BundleMetadata, BundleMetadata Len, Hotcache, Hotcache len]
5455
/// BundleFooter [BundleMetadata, BundleMetadata Len]

quickwit/quickwit-doc-mapper/src/query_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl<'a> ExtractTermSetFields<'a> {
146146
}
147147
}
148148

149-
impl<'a, 'b> QueryAstVisitor<'a> for ExtractTermSetFields<'b> {
149+
impl<'a> QueryAstVisitor<'a> for ExtractTermSetFields<'_> {
150150
type Err = anyhow::Error;
151151

152152
fn visit_term_set(&mut self, term_set_query: &'a TermSetQuery) -> anyhow::Result<()> {

quickwit/quickwit-indexing/src/actors/uploader.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pub enum UploaderType {
6868
}
6969

7070
/// [`SplitsUpdateMailbox`] wraps either a [`Mailbox<Sequencer>`] or [`Mailbox<Publisher>`].
71+
///
7172
/// It makes it possible to send a [`SplitsUpdate`] either to the [`Sequencer`] or directly
7273
/// to [`Publisher`]. It is used in combination with `SplitsUpdateSender` that will do the send.
7374
///

0 commit comments

Comments
 (0)