File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -36,5 +36,12 @@ $ curl -X GET \
36
36
" localhost:8000/search?scope=set:libstd"
37
37
```
38
38
39
+ ## Query Syntax
40
+
41
+ - ` fn f(type) -> type `
42
+ - ` fn (type) -> type `
43
+ - ` fn(type) -> type `
44
+ - ` (type) -> type `
45
+
39
46
## Related Project
40
47
- [ cargo-roogle] ( https://github.com/roogle-rs/cargo-roogle )
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ where
37
37
{
38
38
let ( i, f) = opt ( tag ( "fn" ) ) ( i) ?;
39
39
let ( i, _) = match f {
40
- Some ( _) => multispace1 ( i) ?,
40
+ Some ( _) => multispace0 ( i) ?,
41
41
None => multispace0 ( i) ?,
42
42
} ;
43
- let ( i, name) = opt ( parse_symbol) ( i) ?;
43
+ let ( i, name) = opt ( preceded ( multispace1 , parse_symbol) ) ( i) ?;
44
44
let ( i, decl) = opt ( parse_function) ( i) ?;
45
45
46
46
let query = Query {
You can’t perform that action at this time.
0 commit comments