Skip to content

Commit

Permalink
Nit
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Sep 25, 2023
1 parent b2f0452 commit eb8efcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/src/client/node_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ pub mod participation;
pub mod plugin;

pub(crate) fn query_tuples_to_query_string(
query: impl IntoIterator<Item = Option<(&'static str, String)>>,
tuples: impl IntoIterator<Item = Option<(&'static str, String)>>,
) -> Option<String> {
let query = query
let query = tuples
.into_iter()
.filter_map(|q| q.map(|q| format!("{}={}", q.0, q.1)))
.filter_map(|tuple| tuple.map(|(key, value)| format!("{}={}", key, value)))
.collect::<Vec<_>>();

if query.is_empty() { None } else { Some(query.join("&")) }
Expand Down

0 comments on commit eb8efcb

Please sign in to comment.