Skip to content

Commit

Permalink
Use &** on search_params
Browse files Browse the repository at this point in the history
Signed-off-by: carlosthe19916 <[email protected]>
  • Loading branch information
carlosthe19916 authored and ctron committed Sep 7, 2023
1 parent 17bf3e8 commit 7b3067d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions spog/ui/src/components/advisory/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ pub fn advisory_search(props: &AdvisorySearchProperties) -> Html {
let search_params_state = search_params.clone();
use_callback(
move |sort_by: (String, bool), search_params| {
if let SearchMode::Simple(simple) = search_params {
if let SearchMode::Simple(simple) = &**search_params {
let mut simple = simple.clone();
simple.set_sort_by(sort_by);
search_params_state.set(SearchMode::Simple(simple));
};
},
(*search_params).clone(),
search_params.clone(),
)
};

Expand Down
4 changes: 2 additions & 2 deletions spog/ui/src/components/sbom/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ pub fn sbom_search(props: &SbomSearchProperties) -> Html {
let search_params_state = search_params.clone();
use_callback(
move |sort_by: (String, bool), search_params| {
if let SearchMode::Simple(simple) = search_params {
if let SearchMode::Simple(simple) = &**search_params {
let mut simple = simple.clone();
simple.set_sort_by(sort_by);
search_params_state.set(SearchMode::Simple(simple));
};
},
(*search_params).clone(),
search_params.clone(),
)
};

Expand Down
4 changes: 2 additions & 2 deletions spog/ui/src/pages/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ where
let search_params_state = search_params.clone();
use_callback(
move |sort_by: (String, bool), search_params| {
if let SearchMode::Simple(simple) = search_params {
if let SearchMode::Simple(simple) = &**search_params {
let mut simple = simple.clone();
simple.set_sort_by(sort_by);
search_params_state.set(SearchMode::Simple(simple));
};
},
(*search_params).clone(),
search_params.clone(),
)
};

Expand Down

0 comments on commit 7b3067d

Please sign in to comment.