(
positional_arguments: Option<PositionalArguments>,
keyword_arguments: Option<KeywordArguments>,
)
| 139 | } |
| 140 | |
| 141 | pub(super) fn merge_class_def_args( |
| 142 | positional_arguments: Option<PositionalArguments>, |
| 143 | keyword_arguments: Option<KeywordArguments>, |
| 144 | ) -> Option<Box<ast::Arguments>> { |
| 145 | if positional_arguments.is_none() && keyword_arguments.is_none() { |
| 146 | return None; |
| 147 | } |
| 148 | |
| 149 | let args = if let Some(positional_arguments) = positional_arguments { |
| 150 | positional_arguments.args |
| 151 | } else { |
| 152 | vec![].into_boxed_slice() |
| 153 | }; |
| 154 | let keywords = if let Some(keyword_arguments) = keyword_arguments { |
| 155 | keyword_arguments.keywords |
| 156 | } else { |
| 157 | vec![].into_boxed_slice() |
| 158 | }; |
| 159 | |
| 160 | Some(Box::new(ast::Arguments { |
| 161 | node_index: Default::default(), |
| 162 | range: Default::default(), // TODO |
| 163 | args, |
| 164 | keywords, |
| 165 | })) |
| 166 | } |
no test coverage detected