Skip to content

Commit 2886f1e

Browse files
committed
Support no-convert-floats
1 parent 7e15320 commit 2886f1e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ pub fn builder_from_flags<I>(args: I) -> Result<(Builder, Box<io::Write>), io::E
190190
.takes_value(true)
191191
.multiple(true)
192192
.number_of_values(1),
193+
Arg::with_name("no-convert-floats")
194+
.long("no-convert-floats")
195+
.help("Don't automatically convert floats to f32/f64."),
193196
Arg::with_name("no-unstable-rust")
194197
.long("no-unstable-rust")
195198
.help("Do not generate unstable Rust code."),
@@ -311,6 +314,10 @@ pub fn builder_from_flags<I>(args: I) -> Result<(Builder, Box<io::Write>), io::E
311314
builder = builder.no_unstable_rust();
312315
}
313316

317+
if matches.is_present("no-convert-floats") {
318+
builder = builder.no_convert_floats();
319+
}
320+
314321
if let Some(opaque_types) = matches.values_of("opaque-type") {
315322
for ty in opaque_types {
316323
builder = builder.opaque_type(ty);

0 commit comments

Comments
 (0)