Skip to content

Commit 23007fc

Browse files
committed
Use ThinVec in ast::Block.
1 parent af75a2f commit 23007fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/closures.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use rustc_ast::{ast, ptr};
22
use rustc_span::Span;
3+
use thin_vec::thin_vec;
34

45
use crate::attr::get_attrs_from_stmt;
56
use crate::config::lists::*;
@@ -150,7 +151,7 @@ fn rewrite_closure_with_block(
150151
}
151152

152153
let block = ast::Block {
153-
stmts: vec![ast::Stmt {
154+
stmts: thin_vec![ast::Stmt {
154155
id: ast::NodeId::root(),
155156
kind: ast::StmtKind::Expr(ptr::P(body.clone())),
156157
span: body.span,

0 commit comments

Comments
 (0)