Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartHarris committed Sep 12, 2024
1 parent 3a81402 commit 7d5a4a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions wasm-components/rust/common/src/orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize)]
pub struct Order {
/// UUID
pub order_number: String,
#[doc = r" UUID"]
pub line_items: Vec<LineItem>,
#[doc = r" amount in pennies"]
/// amount in pence
pub total: i32,
}

#[derive(Serialize, Deserialize)]
pub struct LineItem {
pub sku: String,
#[doc = r" amount in pennies"]
/// amount in pence
pub price: i32,
pub quantity: i32,
}
2 changes: 1 addition & 1 deletion wasm-components/rust/common/src/products.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize)]
pub struct Product {
/// UUID
pub id: String,
#[doc = r" UUID"]
pub name: String,
pub description: String,
pub price: i32,
Expand Down
1 change: 0 additions & 1 deletion wasm-components/rust/notification-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use wasi::logging::logging::{log, Level};
struct Component;

impl Guest for Component {
#[doc = r" Callback handled to invoke a function when a message is received from a subscription"]
fn handle_message(msg: BrokerMessage) -> Result<(), String> {
let notification: OrderNotification = serde_json::from_slice(&msg.body).expect(
"NOTIFICATION-SERVICE-HANDLE-MESSAGE: failed to deserialize order notification",
Expand Down
2 changes: 0 additions & 2 deletions wasm-components/rust/orders-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use wasmcloud::{
struct Component;

impl Guest for Component {
#[doc = r" Creates an `order` for specified line items"]
fn create_order(items: Vec<LineItem>) -> Result<(), Error> {
log(
Level::Info,
Expand Down Expand Up @@ -120,7 +119,6 @@ impl Guest for Component {
Ok(())
}

#[doc = r" Lists all orders"]
fn get_orders() -> Result<Vec<Order>, Error> {
let get_orders_query = indoc! {r#"
SELECT
Expand Down

0 comments on commit 7d5a4a2

Please sign in to comment.