Skip to content

Commit a60554a

Browse files
committed
chore(sdk): fix rustfmt and clippy lints
Apply rustfmt to client_mock.rs and replace then(|| ...) with then_some in client.rs to satisfy clippy -D warnings. Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
1 parent 5d5cfe9 commit a60554a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎crates/openshell-sdk/src/client.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ fn create_sandbox_request(spec: SandboxSpec) -> proto::CreateSandboxRequest {
295295
image,
296296
..proto::SandboxTemplate::default()
297297
});
298-
let resource_requirements = gpu.then(|| proto::ResourceRequirements {
298+
let resource_requirements = gpu.then_some(proto::ResourceRequirements {
299299
gpu: Some(proto::GpuResourceRequirements { count: None }),
300300
});
301301
proto::CreateSandboxRequest {

‎crates/openshell-sdk/tests/client_mock.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ impl OpenShell for TestOpenShell {
7575
&self,
7676
_: tonic::Request<proto::UpdateProviderProfilesRequest>,
7777
) -> Result<Response<proto::UpdateProviderProfilesResponse>, Status> {
78-
Ok(Response::new(proto::UpdateProviderProfilesResponse::default()))
78+
Ok(Response::new(
79+
proto::UpdateProviderProfilesResponse::default(),
80+
))
7981
}
8082

8183
async fn create_sandbox(

0 commit comments

Comments
 (0)