Idiomatic Rust returns for Error conversions (#2812)

* Idiomatic Rust returns for Error conversions

* Regenerate Rust samples
This commit is contained in:
Michael Edwards
2019-06-14 10:26:36 +02:00
committed by Benjamin Gill
parent a864ae90de
commit 242d296082
26 changed files with 32 additions and 32 deletions

View File

@@ -10,19 +10,19 @@ pub enum Error {
impl From<reqwest::Error> for Error {
fn from(e: reqwest::Error) -> Self {
return Error::Reqwest(e)
Error::Reqwest(e)
}
}
impl From<serde_json::Error> for Error {
fn from(e: serde_json::Error) -> Self {
return Error::Serde(e)
Error::Serde(e)
}
}
impl From<std::io::Error> for Error {
fn from(e: std::io::Error) -> Self {
return Error::Io(e)
Error::Io(e)
}
}

View File

@@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.2-SNAPSHOT

View File

@@ -55,7 +55,7 @@ Creates list of users with given input array
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Vec<::models::User>**](array.md)| List of user object |
**body** | [**Vec<::models::User>**](User.md)| List of user object |
### Return type
@@ -83,7 +83,7 @@ Creates list of users with given input array
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Vec<::models::User>**](array.md)| List of user object |
**body** | [**Vec<::models::User>**](User.md)| List of user object |
### Return type

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -10,19 +10,19 @@ pub enum Error {
impl From<reqwest::Error> for Error {
fn from(e: reqwest::Error) -> Self {
return Error::Reqwest(e)
Error::Reqwest(e)
}
}
impl From<serde_json::Error> for Error {
fn from(e: serde_json::Error) -> Self {
return Error::Serde(e)
Error::Serde(e)
}
}
impl From<std::io::Error> for Error {
fn from(e: std::io::Error) -> Self {
return Error::Io(e)
Error::Io(e)
}
}

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.2-SNAPSHOT

View File

@@ -55,7 +55,7 @@ Creates list of users with given input array
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Vec<::models::User>**](array.md)| List of user object |
**body** | [**Vec<::models::User>**](User.md)| List of user object |
### Return type
@@ -83,7 +83,7 @@ Creates list of users with given input array
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Vec<::models::User>**](array.md)| List of user object |
**body** | [**Vec<::models::User>**](User.md)| List of user object |
### Return type

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/

View File

@@ -3,7 +3,7 @@
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/