Closed mcintyre94 closed 1 year ago
Definitely a symptom of a deeper problem with strings. I started using strings in init seeds pretty recklessly (essentially letting string literals turn into Rust string literals because it was easier). I'll look pretty closely at this, maybe even adding some unrelated extra fixes if that's okay with you.
Here's an optional second way of doing things, which uses the original type information instead of intuiting based on the generated type's name. Might make things easier in the future, thoughts?
Awesome this LGTM now! TY for the improvement!
Cool! I'll just merge it, I was looking to see if there was any extra problems with strings that could be solved here but it ended up being a totally separate issue.
Since strings in Rust don't implement
Copy
, we need to call.clone()
when we read these fields of an event. This PR adds logic to add.clone()
for only strings.I've also added an event example which shows various different field types in events. I found that lists and arrays also don't work, but will also need further work, so I've opened a separate issue for them: #64
Closes #61