Skip to content

Commit cf16e8d

Browse files
committed
Rename to skip-crate-attributes
1 parent db98247 commit cf16e8d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
99

1010
## [v0.31.2] - 2023-11-29
1111

12-
- Add `include-compatible` config flag
12+
- Add `skip-crate-attributes` config flag
1313
- Add iterators for register/cluster/field arrays
1414
- Use parentheses instead of square brackets in docs for field arrays
1515

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub struct Config {
1010
pub atomics_feature: Option<String>,
1111
pub generic_mod: bool,
1212
pub make_mod: bool,
13-
pub include_compatible: bool,
13+
pub skip_crate_attributes: bool,
1414
pub ignore_groups: bool,
1515
pub keep_list: bool,
1616
pub strict: bool,

src/generate/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
3535
});
3636
}
3737

38-
if !config.include_compatible {
38+
if !config.skip_crate_attributes {
3939
let doc = format!(
4040
"Peripheral access API for {0} microcontrollers \
4141
(generated using svd2rust v{1}{commit_info})\n\n\
@@ -53,7 +53,7 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
5353
out.extend(quote! { #![doc = #doc] });
5454
}
5555

56-
if !config.make_mod && !config.include_compatible {
56+
if !config.make_mod && !config.skip_crate_attributes {
5757
out.extend(quote! {
5858
// Explicitly allow a few warnings that may be verbose
5959
#![allow(non_camel_case_types)]

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ fn run() -> Result<()> {
158158
.help("Create mod.rs instead of lib.rs, without inner attributes"),
159159
)
160160
.arg(
161-
Arg::new("include_compatible")
162-
.long("include-compatible")
163-
.alias("include_compatible")
161+
Arg::new("skip_crate_attributes")
162+
.long("skip-crate-attributes")
163+
.alias("skip_crate_attributes")
164164
.action(ArgAction::SetTrue)
165-
.help("Do not generate top-level attributes to make it compatible with include! macro"),
165+
.help("Do not generate crate attributes"),
166166
)
167167
.arg(
168168
Arg::new("strict")

0 commit comments

Comments
 (0)