Skip to content

Commit

Permalink
Fixes compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfallak committed Sep 4, 2024
1 parent c0165c4 commit 78c8a5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions casper-server/src/lua/uri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ fn normalize_uri(_: &Lua, uri: LuaString) -> LuaResult<String> {
// Split query to a list of (k, v) items (where `v` is optional)
let mut query_pairs = query
.split('&')
.map(|it| it.splitn(2, '=').collect::<Box<_>>())
.collect::<Box<_>>();
.map(|it| it.splitn(2, '=').collect::<Vec<&str>>())
.collect::<Vec<Vec<&str>>>();

// Sort the list
query_pairs.sort_by_key(|x| x[0]);
Expand All @@ -41,7 +41,7 @@ fn normalize_uri(_: &Lua, uri: LuaString) -> LuaResult<String> {
let query = query_pairs
.iter()
.map(|kv| kv.join("="))
.collect::<Box<_>>()
.collect::<Vec<String>>()
.join("&");

parts.path_and_query = Some(format!("{}?{}", path, query).parse().into_lua_err()?)
Expand Down

0 comments on commit 78c8a5a

Please sign in to comment.