File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,14 @@ impl MetaValue {
161
161
value
162
162
} )
163
163
}
164
+
165
+ /// Converts the value if it's a path expression into a `Path` with an inaccurate text range.
166
+ pub fn as_path_with_inaccurate_text_range ( & self ) -> Option < ast:: Path > {
167
+ match & self . expr {
168
+ ast:: Expr :: PathExpr ( path) => path. path ( ) ,
169
+ _ => None ,
170
+ }
171
+ }
164
172
}
165
173
166
174
impl fmt:: Display for MetaValue {
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ pub struct SelectorArg {
136
136
}
137
137
138
138
impl SelectorArg {
139
- /// Returns true if the syntax node can be converted into an ink! impl item .
139
+ /// Returns true if the ink! argument can be converted into an ink! selector .
140
140
pub fn can_cast ( arg : & InkArg ) -> bool {
141
141
* arg. kind ( ) == InkArgKind :: Selector
142
142
}
You can’t perform that action at this time.
0 commit comments