diff options
author | Christian Poveda Ruiz <31802960+pvdrz@users.noreply.github.com> | 2023-02-10 10:17:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 10:17:32 -0500 |
commit | ce0ae76899a39a93e7db8f8ad24c5e681a3d7294 (patch) | |
tree | bd173f641aeaa7e07a1485937aa50cfe6604e486 /bindgen/codegen/serialize.rs | |
parent | 01c45391284674041f89454bfe6eeb900aa0be28 (diff) |
Disallow constant values that were changed in clang 15 (#2410)
* Disallow constant values that could cause problems with clang 15
* Fix clippy warnings
Diffstat (limited to 'bindgen/codegen/serialize.rs')
-rw-r--r-- | bindgen/codegen/serialize.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bindgen/codegen/serialize.rs b/bindgen/codegen/serialize.rs index 217098e5..e521c703 100644 --- a/bindgen/codegen/serialize.rs +++ b/bindgen/codegen/serialize.rs @@ -44,12 +44,10 @@ impl<'a> CSerialize<'a> for Item { ItemKind::Function(func) => { func.serialize(ctx, self, stack, writer) } - kind => { - return Err(CodegenError::Serialize { - msg: format!("Cannot serialize item kind {:?}", kind), - loc: get_loc(self), - }); - } + kind => Err(CodegenError::Serialize { + msg: format!("Cannot serialize item kind {:?}", kind), + loc: get_loc(self), + }), } } } |