diff --git a/opendut-carl/src/persistence/mod.rs b/opendut-carl/src/persistence/mod.rs index e63de322..7f20c918 100644 --- a/opendut-carl/src/persistence/mod.rs +++ b/opendut-carl/src/persistence/mod.rs @@ -15,7 +15,7 @@ pub struct Db<'a> { pub inner: Mutex<&'a mut PgConnection>, //Mutex rather than RwLock, because we share this between threads (i.e. we need it to implement `Sync`) } impl<'a> Db<'a> { - pub fn from_connection(connection: &'a mut PgConnection) -> Db { + pub fn from_connection(connection: &'a mut PgConnection) -> Db<'a> { Self { inner: Mutex::new(connection) } } pub fn connection(&self) -> MutexGuard<&'a mut PgConnection> { diff --git a/opendut-carl/src/resources/transaction.rs b/opendut-carl/src/resources/transaction.rs index e624607a..bb841901 100644 --- a/opendut-carl/src/resources/transaction.rs +++ b/opendut-carl/src/resources/transaction.rs @@ -27,7 +27,7 @@ impl<'transaction> ResourcesTransaction<'transaction> { } } } -impl<'transaction> ResourcesStorageApi for ResourcesTransaction<'transaction> { +impl ResourcesStorageApi for ResourcesTransaction<'_> { fn insert(&mut self, id: R::Id, resource: R) -> PersistenceResult<()> where R: Resource + Persistable + Subscribable { match self { diff --git a/opendut-edgar/src/service/test_execution/container_manager.rs b/opendut-edgar/src/service/test_execution/container_manager.rs index e772f312..644a3dbc 100644 --- a/opendut-edgar/src/service/test_execution/container_manager.rs +++ b/opendut-edgar/src/service/test_execution/container_manager.rs @@ -111,7 +111,7 @@ impl ContainerManager { Ok(()) } - async fn get_container_state(&self, container_name: &String) -> Result { + async fn get_container_state(&self, container_name: &str) -> Result { let output = Command::new(self.config.engine.command_name()) .args(["inspect", "-f", "'{{.State.Status}}'", container_name]) .output() @@ -194,7 +194,7 @@ impl ContainerManager { Ok(output.status.success()) } - async fn stop_container(&self, container_name: &String) -> Result<(), Error>{ + async fn stop_container(&self, container_name: &str) -> Result<(), Error>{ let output = Command::new(self.config.engine.command_name()) .args(["stop", container_name]) .output() diff --git a/opendut-edgar/src/setup/util.rs b/opendut-edgar/src/setup/util.rs index 3b3f270a..66f65742 100644 --- a/opendut-edgar/src/setup/util.rs +++ b/opendut-edgar/src/setup/util.rs @@ -98,7 +98,7 @@ pub mod checksum { } pub fn running_in_docker() -> bool { - return Path::new("/.dockerenv").exists(); + Path::new("/.dockerenv").exists() } diff --git a/opendut-util/opendut-auth/src/confidential/blocking/client.rs b/opendut-util/opendut-auth/src/confidential/blocking/client.rs index ac7d4b91..de2b5bdd 100644 --- a/opendut-util/opendut-auth/src/confidential/blocking/client.rs +++ b/opendut-util/opendut-auth/src/confidential/blocking/client.rs @@ -213,7 +213,7 @@ impl Interceptor for ConfClientArcMutex> { } }; - return match token { + match token { None => { Ok(request) } Some(token_result) => { match token_result { @@ -226,7 +226,7 @@ impl Interceptor for ConfClientArcMutex> { Err(error) => { Err(Status::unauthenticated(format!("{}", error))) } } } - }; + } } } diff --git a/opendut-util/opendut-auth/src/confidential/tonic_service.rs b/opendut-util/opendut-auth/src/confidential/tonic_service.rs index eb6fd413..4ae6849a 100644 --- a/opendut-util/opendut-auth/src/confidential/tonic_service.rs +++ b/opendut-util/opendut-auth/src/confidential/tonic_service.rs @@ -49,7 +49,7 @@ impl Service> for TonicAuthenticationService { let token_result = confidential_client.as_ref() .map(|manager| manager.get_token()); - return match token_result { + match token_result { None => { // Authentication disabled Ok(inner.call(request).await?) @@ -75,7 +75,7 @@ impl Service> for TonicAuthenticationService { } } } - }; + } }) } }