diff options
author | David Vo <auscompgeek@users.noreply.github.com> | 2019-11-15 00:26:41 +1100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-11-14 17:35:38 +0100 |
commit | 5f4dc4f458f0fd14beafbacb8bb20a5a4d139cd5 (patch) | |
tree | bb5a46817ed8c7e379a718719440dbc84ca18a65 /src/codegen/mod.rs | |
parent | ac498475e04b44e3c555002213fa9cba0658198e (diff) |
Make rustfmt happy
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 90314a57..1fad91f4 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -2323,16 +2323,24 @@ impl std::str::FromStr for EnumVariation { /// Create a `EnumVariation` from a string. fn from_str(s: &str) -> Result<Self, Self::Err> { match s { - "rust" => Ok(EnumVariation::Rust{ non_exhaustive: false }), - "rust_non_exhaustive" => Ok(EnumVariation::Rust{ non_exhaustive: true }), + "rust" => Ok(EnumVariation::Rust { + non_exhaustive: false, + }), + "rust_non_exhaustive" => Ok(EnumVariation::Rust { + non_exhaustive: true, + }), "bitfield" => Ok(EnumVariation::NewType { is_bitfield: true }), "consts" => Ok(EnumVariation::Consts), "moduleconsts" => Ok(EnumVariation::ModuleConsts), "newtype" => Ok(EnumVariation::NewType { is_bitfield: false }), - _ => Err(std::io::Error::new(std::io::ErrorKind::InvalidInput, - concat!("Got an invalid EnumVariation. Accepted values ", - "are 'rust', 'rust_non_exhaustive', 'bitfield', 'consts',", - "'moduleconsts', and 'newtype'."))), + _ => Err(std::io::Error::new( + std::io::ErrorKind::InvalidInput, + concat!( + "Got an invalid EnumVariation. Accepted values ", + "are 'rust', 'rust_non_exhaustive', 'bitfield', 'consts',", + "'moduleconsts', and 'newtype'." + ), + )), } } } |