Skip to content

Commit 122590d

Browse files
committed
fix(swc-angular-plugin): make lifetime explicit in parse_query_prop_info return type
Rust CI is failing to build jscutlery#802. The function `parse_query_prop_info` returned `AngularPropInfo` with an elided lifetime, while the input `&ClassProp` provided the borrow. This inconsistency triggered the lint. Updated the return type to `AngularPropInfo<'_>` to explicitly tie the lifetime of the returned value to the input borrow, removing the warning and unifying local and CI builds. This makes the lifetime contract explicit.
1 parent c1a5879 commit 122590d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/swc-angular-plugin/src/component_property_visitor/query_prop_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl AngularPropParser for QueryPropParser {
3737
}
3838

3939
impl QueryPropParser {
40-
fn parse_query_prop_info(class_prop: &ClassProp) -> Option<(QueryType, AngularPropInfo)> {
40+
fn parse_query_prop_info(class_prop: &ClassProp) -> Option<(QueryType, AngularPropInfo<'_>)> {
4141
/* `viewChild` & `viewChildren` are probably more frequently used so let's
4242
* try to parse them first. */
4343
if let Some(prop_info) = parse_angular_prop(class_prop, "viewChild") {

0 commit comments

Comments
 (0)