Skip to content

Commit

Permalink
fix: emit-extensions and emit-descriptions features not being used by…
Browse files Browse the repository at this point in the history
… mavlink-bindgen
  • Loading branch information
pv42 committed Jul 31, 2024
1 parent ab925ad commit c480ac7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions mavlink-bindgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ anstyle-parse = { version = "=0.2.1", optional=true }

[features]
cli = ["dep:clap", "dep:clap_lex", "dep:clap_builder", "dep:anstyle", "dep:anstyle-query", "dep:anstyle-parse"]
emit-extensions = []
emit-description = []
2 changes: 1 addition & 1 deletion mavlink-core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn remove_trailing_zeroes(data: &[u8]) -> usize {
/// `MavType`s. This is only needed because rust doesn't currently implement `Default` for arrays
/// of all sizes. In particular this trait is only ever used when the "serde" feature is enabled.
/// For more information, check out [this issue](https://users.rust-lang.org/t/issue-for-derives-for-arrays-greater-than-size-32/59055/3).
pub(crate) trait RustDefault: Copy {
pub trait RustDefault: Copy {
fn rust_default() -> Self;
}

Expand Down
4 changes: 2 additions & 2 deletions mavlink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ serde_arrays = { version = "0.1.0", optional = true }
]

"format-generated-code" = []
"emit-description" = []
"emit-extensions" = []
"emit-description" = ["mavlink-bindgen/emit-description"]
"emit-extensions" = ["mavlink-bindgen/emit-extensions"]
"std" = ["mavlink-core/std"]
"udp" = ["mavlink-core/udp"]
"tcp" = ["mavlink-core/tcp"]
Expand Down
4 changes: 4 additions & 0 deletions mavlink/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
include!(concat!(env!("OUT_DIR"), "/mod.rs"));

pub use mavlink_core::*;

#[cfg(feature = "emit-extensions")]
#[allow(unused_imports)]
pub(crate) use mavlink_core::utils::RustDefault;

0 comments on commit c480ac7

Please sign in to comment.