Skip to content

Commit ccc1535

Browse files
committed
Apply clippy lints
1 parent f80403f commit ccc1535

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/distributed/dispatcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl<'a, 'b> Dispatcher<'a, 'b> {
196196
// Workers of the world, register!
197197
if self.accept_connections {
198198
while let Ok((mut remote_stream, remote_addr)) = listener.accept() {
199-
info!("Connection established ({:?})", remote_addr);
199+
info!("Connection established ({remote_addr:?})");
200200
max_token += 1;
201201
let remote_token = Token(max_token);
202202
poll.registry().register(
@@ -392,7 +392,7 @@ impl<'a, 'b> Dispatcher<'a, 'b> {
392392
.assigned_task
393393
.take()
394394
{
395-
warn!("Requery task {} of failed worker", assigned_task);
395+
warn!("Requery task {assigned_task} of failed worker");
396396
task_queue.requery_task(assigned_task);
397397
}
398398
self.connections

src/map/input_chunk_reader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ where
190190

191191
fn next(&mut self) -> Option<Self::Item> {
192192
if let Some(task) = self.requeried_tasks.pop() {
193-
info!("Retrying previously failed task {}", task);
193+
info!("Retrying previously failed task {task}");
194194
return Some(task);
195195
}
196196

@@ -199,15 +199,15 @@ where
199199
.by_ref()
200200
.filter_map(|record| {
201201
if let Err(ref e) = record {
202-
error!("Skip record due to an error: {}", e);
202+
error!("Skip record due to an error: {e}");
203203
}
204204
record.ok()
205205
})
206206
.filter(|record| {
207207
let length_check_ok = record.sequence.len() == record.base_qualities.len();
208208
if !length_check_ok {
209209
error!(
210-
"Skip record \"{}\" due to different length of sequence and quality strings", record
210+
"Skip record \"{record}\" due to different length of sequence and quality strings"
211211
);
212212
}
213213
length_check_ok

src/map/mapping.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,7 @@ where
546546

547547
if hits_found {
548548
debug!(
549-
"Hits could not be mapped to valid coordinates. Report read \"{}\" as unmapped.",
550-
input_record
549+
"Hits could not be mapped to valid coordinates. Report read \"{input_record}\" as unmapped."
551550
);
552551
}
553552

src/map/sequence_difference_models.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ impl Display for SimpleAncientDnaModel {
273273

274274
impl SimpleAncientDnaModel {
275275
fn qual2prob(encoded_base_quality: u8) -> f32 {
276-
10_f32.powf(-1.0 * f32::from(encoded_base_quality) / 10.0) / 3.0
276+
10_f32.powf(-f32::from(encoded_base_quality) / 10.0) / 3.0
277277
}
278278

279279
pub fn new(
@@ -327,7 +327,7 @@ impl SimpleAncientDnaModel {
327327

328328
// Requiring `Display` as a supertrait to `SequenceDifferenceModel` would be a better
329329
// solution, but due to the static dispatch tricks it's not that simple.
330-
info!("{}", retval);
330+
info!("{retval}");
331331

332332
retval
333333
}

0 commit comments

Comments
 (0)