chore(lint): fix clippy warnings (#109)

fix clippy warnings
This commit is contained in:
Ayrat Badykov 2023-02-03 20:41:14 +02:00 committed by GitHub
parent 01934e231f
commit 3e4bf7ddb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ pub const RETRIES_NUMBER: i32 = 20;
impl From<AsyncQueueError> for FangError {
fn from(error: AsyncQueueError) -> Self {
let message = format!("{:?}", error);
let message = format!("{error:?}");
FangError {
description: message,
}

View file

@ -6,14 +6,14 @@ use std::io::Error as IoError;
impl From<IoError> for FangError {
fn from(error: IoError) -> Self {
let description = format!("{:?}", error);
let description = format!("{error:?}");
FangError { description }
}
}
impl From<QueueError> for FangError {
fn from(error: QueueError) -> Self {
let description = format!("{:?}", error);
let description = format!("{error:?}");
FangError { description }
}
}

View file

@ -56,7 +56,7 @@ where
/// This is necessary in order to execute tasks.
pub fn start(&mut self) -> Result<(), FangError> {
for idx in 1..self.number_of_workers + 1 {
let name = format!("worker_{}{}", self.task_type, idx);
let name = format!("worker_{}{idx}", self.task_type);
let worker_thread = WorkerThread::builder()
.name(name.clone())