Don't use matches!() to support older rustc versions.

Fixes #574
This commit is contained in:
Emilio Cobos Álvarez 2020-09-21 20:46:44 +02:00
parent 1e46e53ae2
commit e4da7d39a6
No known key found for this signature in database
GPG Key ID: E1152D0994E4BF8A
4 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,7 @@
## 0.14.6
* Fixed the builds with older versions of rustc.
## 0.14.5
* Add support to specify line ending style (#568)

2
Cargo.lock generated
View File

@ -32,7 +32,7 @@ dependencies = [
[[package]]
name = "cbindgen"
version = "0.14.5"
version = "0.14.6"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,6 +1,6 @@
[package]
name = "cbindgen"
version = "0.14.5"
version = "0.14.6"
authors = ["Jeff Muizelaar <jmuizelaar@mozilla.com>",
"Kartikaya Gupta <kats@mozilla.com>",
"Ryan Hunt <rhunt@eqrion.net>"]

View File

@ -210,8 +210,9 @@ impl Function {
}
for arg in &mut self.args {
if !matches!(arg.ty, Type::Ptr { .. }) {
continue;
match arg.ty {
Type::Ptr { .. } => {},
_ => continue,
}
let name = match arg.name {
Some(ref name) => name,