Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartHarris committed Sep 20, 2024
1 parent 9580e41 commit e528903
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wasm-components/rust/http-controller/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Handlers {
match request.method() {
Method::Get => {
let skus = &query[KEY];
let skus: Vec<String> = skus.split(',').map(|s| s.to_string()).collect();
let skus: Vec<String> = skus.split(',').map(String::from).collect();

match get_inventory(&skus) {
Ok(inventory) => {
Expand All @@ -178,7 +178,7 @@ impl Handlers {
Err(e) => response::server_error(&format!("failed to get orders: {e}")),
},
Method::Post => {
let Ok(items) = request.json::<Vec<common::orders::LineItem>>() else {
let Ok(items) = request.json::<Vec<LineItemData>>() else {
return response::bad_request();
};

Expand Down

0 comments on commit e528903

Please sign in to comment.