counted-array icon indicating copy to clipboard operation
counted-array copied to clipboard

Doesn't work with StaticVec

Open NilsIrl opened this issue 5 years ago • 1 comments

StaticVec: https://github.com/slightlyoutofphase/staticvec

I get the following error:

error: no rules expected the token `staticvec`
  --> src/main.rs:53:44
   |
53 | counted_array::counted_array!(const GAMES: staticvec::StaticVec<Game> = compile_time_serde::deserialize_json!());
   |                                            ^^^^^^^^^ no rules expected this token in macro call

I can make more code available so please let me know if more context is needed.

CC @slightlyoutofphase

NilsIrl avatar Apr 16 '20 09:04 NilsIrl

I tried implementing it, but unfortunately it seems that macro_rule doesn't allow a type to be followed by a < for a reason I don't understand.

branch of my work: https://github.com/durka/counted-array/compare/master...NilsIrl:vec_like_type

NilsIrl avatar Apr 16 '20 12:04 NilsIrl