Skip to content

Commit

Permalink
Fix warnings after upgrade to rustc v1.83.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfm committed Nov 29, 2024
1 parent 26e2fcf commit 3d25da2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion opendut-carl/src/persistence/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion opendut-carl/src/resources/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl<'transaction> ResourcesTransaction<'transaction> {
}
}
}
impl<'transaction> ResourcesStorageApi for ResourcesTransaction<'transaction> {
impl ResourcesStorageApi for ResourcesTransaction<'_> {
fn insert<R>(&mut self, id: R::Id, resource: R) -> PersistenceResult<()>
where R: Resource + Persistable + Subscribable {
match self {
Expand Down
4 changes: 2 additions & 2 deletions opendut-edgar/src/service/test_execution/container_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl ContainerManager {
Ok(())
}

async fn get_container_state(&self, container_name: &String) -> Result<ContainerState, Error> {
async fn get_container_state(&self, container_name: &str) -> Result<ContainerState, Error> {
let output = Command::new(self.config.engine.command_name())
.args(["inspect", "-f", "'{{.State.Status}}'", container_name])
.output()
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion opendut-edgar/src/setup/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub mod checksum {
}

pub fn running_in_docker() -> bool {
return Path::new("/.dockerenv").exists();
Path::new("/.dockerenv").exists()
}


Expand Down
4 changes: 2 additions & 2 deletions opendut-util/opendut-auth/src/confidential/blocking/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ impl Interceptor for ConfClientArcMutex<Option<ConfidentialClientRef>> {
}
};

return match token {
match token {
None => { Ok(request) }
Some(token_result) => {
match token_result {
Expand All @@ -226,7 +226,7 @@ impl Interceptor for ConfClientArcMutex<Option<ConfidentialClientRef>> {
Err(error) => { Err(Status::unauthenticated(format!("{}", error))) }
}
}
};
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions opendut-util/opendut-auth/src/confidential/tonic_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Service<Request<BoxBody>> 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?)
Expand All @@ -75,7 +75,7 @@ impl Service<Request<BoxBody>> for TonicAuthenticationService {
}
}
}
};
}
})
}
}

0 comments on commit 3d25da2

Please sign in to comment.