Skip to content

Commit

Permalink
Fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Sep 6, 2024
1 parent 2815710 commit 155b45f
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<_>>())
.collect::<Vec<_>>();

// 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<_>>()
.join("&");

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

0 comments on commit 155b45f

Please sign in to comment.