File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " clucstr"
3
- version = " 0.1.3 "
3
+ version = " 0.1.4 "
4
4
authors = [" Денис Котляров <#Ulin Project 18, denis2005991@gmail.com>" ]
5
5
repository = " https://github.com/clucompany/cluCStr.git"
6
6
license = " Apache-2.0"
Original file line number Diff line number Diff line change @@ -186,7 +186,13 @@ pub fn plugin_registrar(reg: &mut Registry) {
186
186
pub fn cstr ( cx : & mut ExtCtxt , sp : Span , args : & [ TokenTree ] ) -> Box < MacResult + ' static > {
187
187
let mut parser = cx. new_parser_from_tts ( args) ;
188
188
189
- let expr = parser. parse_expr ( ) . unwrap ( ) ;
189
+ let expr = match parser. parse_expr ( ) {
190
+ Ok ( a) => a,
191
+ Err ( _e) => {
192
+ cx. span_err ( sp, "cstr currently only supports one argument" ) ;
193
+ return DummyResult :: any ( sp) ;
194
+ }
195
+ } ;
190
196
191
197
let c_array = {
192
198
let mut add_null = true ;
You can’t perform that action at this time.
0 commit comments