Skip to content

Commit b1993e9

Browse files
committed
transpile: don't hide --no-reorganize-definitions and rename _{no => unused}_reorganize_definitions
The latter is because the two fields are equal, so naming the second one `no` is misleading.
1 parent 232ff41 commit b1993e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

c2rust/src/bin/c2rust-transpile.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use clap::{Parser, ValueEnum};
1+
use clap::{ArgAction, Parser, ValueEnum};
22
use log::LevelFilter;
33
use regex::Regex;
44
use std::{ffi::OsStr, fs, path::PathBuf};
@@ -125,7 +125,7 @@ struct Args {
125125
reduce_type_annotations: bool,
126126

127127
/// Disable `--reorganize-definitions`
128-
#[clap(long = "no-reorganize-definitions", hidden = true, action = clap::ArgAction::SetFalse)]
128+
#[clap(long = "no-reorganize-definitions", action = ArgAction::SetFalse)]
129129
reorganize_definitions: bool, // NB, this *is* the right field; this flag sets it to *false*.
130130

131131
/// Output file in such a way that the refactoring tool can deduplicate code (enabled by default; disable with `--no-reorganize-definitions`)
@@ -134,7 +134,7 @@ struct Args {
134134
long = "reorganize-definitions",
135135
conflicts_with = "reorganize-definitions"
136136
)]
137-
_no_reorganize_definitions: bool, // Field is unused, but flag mutually excludes the negative sense above.
137+
_unused_reorganize_definitions: bool, // Field is unused, but flag mutually excludes the negative sense above.
138138

139139
/// Extra arguments to pass to clang frontend during parsing the input C file
140140
#[clap(multiple = true, last(true))]

0 commit comments

Comments
 (0)