Remove P::map.

It's barely used, and the places that use it are better if they don't.
This commit is contained in:
Nicholas Nethercote
2025-05-27 01:42:51 +10:00
parent a35675d38f
commit 6973fa08a3
4 changed files with 21 additions and 38 deletions

View File

@@ -1123,10 +1123,9 @@ impl Stmt {
pub fn add_trailing_semicolon(mut self) -> Self {
self.kind = match self.kind {
StmtKind::Expr(expr) => StmtKind::Semi(expr),
StmtKind::MacCall(mac) => {
StmtKind::MacCall(mac.map(|MacCallStmt { mac, style: _, attrs, tokens }| {
MacCallStmt { mac, style: MacStmtStyle::Semicolon, attrs, tokens }
}))
StmtKind::MacCall(mut mac) => {
mac.style = MacStmtStyle::Semicolon;
StmtKind::MacCall(mac)
}
kind => kind,
};