fix(api types): Add an unused field to empty API types.

Null structs (struct Foo;) cause the following error when trying to
deserialize an empty JSON object `{}` into them:

`JsonDecodeError("{}\n", Syntax(InvalidType(Map), 1, 1))` (also known as
`invalid type: map at line 1 column 1: {}`). The optional struct member
prevents this error.
This commit is contained in:
Lewin Bormann
2016-09-21 21:37:39 +02:00
parent 4a92a47bed
commit 0f14aa966e
20 changed files with 42 additions and 41 deletions

View File

@@ -371,7 +371,7 @@ impl Part for Library {}
/// * [modules versions instances debug apps](struct.AppModuleVersionInstanceDebugCall.html) (request)
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct DebugInstanceRequest;
pub struct DebugInstanceRequest { _never_set: Option<bool> }
impl RequestValue for DebugInstanceRequest {}