Skip to content

Commit

Permalink
chore: fixed cargo check warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhranshuSanjeev committed May 15, 2024
1 parent 6432d2b commit 91b1940
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion crates/context_aware_config/src/api/context/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn get_functions_map(
}

pub fn validate_value_with_function(
fun_name: &str,
_fun_name: &str,
function: &str,
key: &String,
value: &Value,
Expand Down
2 changes: 1 addition & 1 deletion crates/context_aware_config/src/validation_functions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use serde_json::{json, Value};
use serde_json::Value;
use service_utils::result as superposition;
use service_utils::unexpected_error;
use service_utils::validation_error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ fn single_dimension_ctx_gen(value: Dimensions) -> serde_json::Value {
}),
Dimensions::VARIANTIDS(id) => serde_json::json!({
"in": [
{"var": "variantIds"},
id,
{"var": "variantIds"},
]
}),
}
Expand Down
4 changes: 2 additions & 2 deletions crates/frontend/src/components/context_form/context_form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ where
on:click=move |_| {
let mut current_context = context.get();
current_context.remove(idx);
set_context.set(current_context.clone());
logging::log!("current context {:?}",current_context.clone());
set_used_dimensions
.update(|value| {
value.remove(&dimension_name.get_value());
});
set_context.set(current_context.clone());
logging::log!("current context {:?}",current_context.clone());
}
>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,7 @@ where
}

#[component]
pub fn test_form<NF>(
function_name: String,
stage: String,
handle_submit: NF,
) -> impl IntoView
where
NF: Fn() + 'static + Clone,
{
pub fn test_form(function_name: String, stage: String) -> impl IntoView {
let tenant_rs = use_context::<ReadSignal<String>>().unwrap();
let (error_message, set_error_message) = create_signal("".to_string());
let (output_message, set_output_message) =
Expand Down
2 changes: 0 additions & 2 deletions crates/frontend/src/pages/function/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ pub fn function_page() -> impl IntoView {
<TestForm
function_name=fun_pub.function_name.clone()
stage="PUBLISHED".to_string()
handle_submit=move || {}
/>

</div>
Expand Down Expand Up @@ -479,7 +478,6 @@ pub fn function_page() -> impl IntoView {
<TestForm
function_name=function_test.function_name.clone()
stage="DRAFT".to_string()
handle_submit=move || {}
/>

</div>
Expand Down
1 change: 1 addition & 0 deletions crates/frontend/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ pub fn get_tenants() -> Vec<String> {
.unwrap_or(vec![])
}

#[allow(dead_code)]
pub fn use_env() -> Envs {
let context = use_context::<Envs>();
context
Expand Down

0 comments on commit 91b1940

Please sign in to comment.