Skip to content

Commit

Permalink
Make private translated fields accessible within the crate
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Oct 2, 2024
1 parent c85f91e commit ebbea02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crates/header-translator/src/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,9 @@ impl Stmt {
writeln!(f, "pub struct {} {{", id.name)?;
for (name, ty) in fields {
write!(f, " ")?;
if !name.starts_with('_') {
if name.starts_with('_') {
write!(f, "pub(crate) ")?;
} else {
write!(f, "pub ")?;
}
let name = handle_reserved(name);
Expand Down
2 changes: 1 addition & 1 deletion generated

0 comments on commit ebbea02

Please sign in to comment.