Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions physx-sys/pxbind/src/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,9 @@ pub enum Item {
TypedefDecl(Typedef),
/// The deprecated declspec has been defined on the item (PX_DEPRECATED)
DeprecatedAttr,
FullComment,
/// We don't care about other items
Other {
kind: Option<clang_ast::Kind>,
name: Option<String>,
},
Other,
}

impl fmt::Display for Item {
Expand Down Expand Up @@ -392,15 +390,10 @@ impl<'ast> AstConsumer<'ast> {

/// Walks the AST of a node and attempts to retrieve a comment for it
fn get_comment(node: &Node) -> Option<Comment<'_>> {
let full_comment = node.inner.iter().find(|inner| {
matches!(
inner.kind,
Item::Other {
kind: Some(clang_ast::Kind::FullComment),
name: _,
}
)
})?;
let full_comment = node
.inner
.iter()
.find(|inner| matches!(inner.kind, Item::FullComment))?;

fn gather<'ast>(
node: &'ast Node,
Expand Down
Loading