Skip to content

Commit

Permalink
Fixed lint and formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBossbaly committed Jan 4, 2024
1 parent 08d9516 commit 4087d0d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
13 changes: 3 additions & 10 deletions core/launcher/src/manager/app_launcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ impl AppLauncher {
async move {
debug!("set_state: container_id={}", container_id);
let mut final_resp = Ok(AppManagerResponse::None);
let item = state
.app_launcher_state
.get_app_by_id(&container_id);
let item = state.app_launcher_state.get_app_by_id(&container_id);

if let Some(app) = item {
let previous_state = app.state;
Expand Down Expand Up @@ -436,10 +434,7 @@ impl AppLauncher {
debug!("on_unloading: entry: app_id={}", app_id);

let id = app_id.to_string();
let timeout = state
.config
.lifecycle_policy
.app_finished_timeout_ms;
let timeout = state.config.lifecycle_policy.app_finished_timeout_ms;
let state_c = state.clone();
tokio::spawn(async move {
sleep(Duration::from_millis(timeout)).await;
Expand Down Expand Up @@ -625,9 +620,7 @@ impl AppLauncher {
if app_type.is_none() {
return Err(AppError::NotSupported);
}
let instances = state
.app_launcher_state
.get_active_instances(&app_manifest);
let instances = state.app_launcher_state.get_active_instances(&app_manifest);
let bnrp = BrowserNameRequestParams {
name: app_manifest.name.clone(),
runtime: app_manifest.runtime.clone(),
Expand Down
4 changes: 2 additions & 2 deletions core/main/src/state/extn_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl LoadedLibrary {
.symbols
.iter()
.filter(|x| extn_ids.contains(&x.id))
.map(|x| x.clone())
.cloned()
.collect()
}

Expand All @@ -97,7 +97,7 @@ impl LoadedLibrary {
.symbols
.iter()
.filter(|x| extn_ids.contains(&x.id))
.map(|x| x.clone())
.cloned()
.collect()
}

Expand Down
6 changes: 3 additions & 3 deletions core/sdk/src/api/device/device_user_grants_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ impl GrantPolicies {
}
CapabilityRole::Manage => {
if let Some(manage) = &self.manage {
return Some(manage.clone())
}
return Some(manage.clone());
}
}
CapabilityRole::Provide => {
if let Some(provide) = &self.provide {
return Some(provide.clone())
return Some(provide.clone());
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions core/sdk/src/extn/client/extn_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,12 @@ pub trait ExtnRequestProcessor: ExtnStreamProcessor + Send + Sync + 'static {
});
}

async fn handle_error(mut extn_client: ExtnClient, req: ExtnMessage, error: RippleError) -> bool {
if let Err(e) = extn_client
.respond(req, ExtnResponse::Error(error))
.await
{
async fn handle_error(
mut extn_client: ExtnClient,
req: ExtnMessage,
error: RippleError,
) -> bool {
if let Err(e) = extn_client.respond(req, ExtnResponse::Error(error)).await {
error!("Error during responding {:?}", e);
}
// to support return chaining in processors
Expand Down

0 comments on commit 4087d0d

Please sign in to comment.