Skip to content

Commit

Permalink
codegen: Panic if we have a struct with more than 12 members
Browse files Browse the repository at this point in the history
  • Loading branch information
diwic committed Oct 30, 2024
1 parent 911da52 commit d84298b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dbus-codegen/src/generate/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub (super) fn xml_to_rust_type(i: &mut &[u8], no_refs: bool, genvars: &mut Opti
};
*i = &i[1..];
if s.len() > 12 {
"VecDeque<Box<RefArg>>".into()
panic!("Structs with more than 12 items are not supported, see https://github.com/diwic/dbus-rs/issues/488")
} else {
format!("({},)", s.join(", "))
}
Expand Down
4 changes: 4 additions & 0 deletions dbus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#![warn(missing_docs)]

// We have io-lifetimes and native-channel which are not ready yet
// so for now allow them in the codebase and silence the warning
#![allow(unexpected_cfgs)]

extern crate libc;

#[allow(missing_docs)]
Expand Down

0 comments on commit d84298b

Please sign in to comment.