Skip to content

Commit 79a9897

Browse files
committed
Reduce P<T> to a typedef of Box<T>.
Keep the `P` constructor function for now, to minimize immediate churn. All the `into_inner` calls are removed, which is nice.
1 parent 2f3a0a5 commit 79a9897

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/modules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl<'ast, 'psess, 'c> ModResolver<'ast, 'psess> {
174174
) -> Result<(), ModuleResolutionError> {
175175
for item in items {
176176
if is_cfg_if(&item) {
177-
self.visit_cfg_if(Cow::Owned(item.into_inner()))?;
177+
self.visit_cfg_if(Cow::Owned(*item))?;
178178
continue;
179179
}
180180

src/parse/macros/cfg_if.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn parse_cfg_if_inner<'a>(
6262

6363
while parser.token != TokenKind::CloseBrace && parser.token.kind != TokenKind::Eof {
6464
let item = match parser.parse_item(ForceCollect::No) {
65-
Ok(Some(item_ptr)) => item_ptr.into_inner(),
65+
Ok(Some(item_ptr)) => *item_ptr,
6666
Ok(None) => continue,
6767
Err(err) => {
6868
err.cancel();

0 commit comments

Comments
 (0)