From 70737fb1e6b67e99fd2276533662c90f1c2a00a1 Mon Sep 17 00:00:00 2001 From: WILLIAM CHENG Date: Thu, 11 Nov 2021 14:30:32 +0800 Subject: [PATCH] update rust samples --- .../client/petstore/rust/hyper/petstore/src/models/order.rs | 6 ++++++ .../client/petstore/rust/hyper/petstore/src/models/pet.rs | 6 ++++++ .../rust/reqwest/petstore-async/src/models/order.rs | 6 ++++++ .../petstore/rust/reqwest/petstore-async/src/models/pet.rs | 6 ++++++ .../petstore/rust/reqwest/petstore/src/models/order.rs | 6 ++++++ .../client/petstore/rust/reqwest/petstore/src/models/pet.rs | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/order.rs b/samples/client/petstore/rust/hyper/petstore/src/models/order.rs index 3e6a00aaeae2..66d211cb5799 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/order.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/order.rs @@ -54,3 +54,9 @@ pub enum Status { Delivered, } +impl Default for Status { + fn default() -> Status { + Self::Placed + } +} + diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs b/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs index 358961f2c718..af6c8b6ca5da 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/models/pet.rs @@ -54,3 +54,9 @@ pub enum Status { Sold, } +impl Default for Status { + fn default() -> Status { + Self::Available + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs index 3e6a00aaeae2..66d211cb5799 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs @@ -54,3 +54,9 @@ pub enum Status { Delivered, } +impl Default for Status { + fn default() -> Status { + Self::Placed + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs index 358961f2c718..af6c8b6ca5da 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs @@ -54,3 +54,9 @@ pub enum Status { Sold, } +impl Default for Status { + fn default() -> Status { + Self::Available + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs index 3e6a00aaeae2..66d211cb5799 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/order.rs @@ -54,3 +54,9 @@ pub enum Status { Delivered, } +impl Default for Status { + fn default() -> Status { + Self::Placed + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs index 358961f2c718..af6c8b6ca5da 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/models/pet.rs @@ -54,3 +54,9 @@ pub enum Status { Sold, } +impl Default for Status { + fn default() -> Status { + Self::Available + } +} +