slack-rs / slack-rs-api

Rust interface for the Slack Web API
Apache License 2.0
109 stars 66 forks source link

Bot icons #69

Closed bunker-inspector closed 4 years ago

bunker-inspector commented 5 years ago

Looking for your thoughts on this one since ::optional_struct_or_empty_array didn't work quite right without coercing the type it generated. It was being output as Optional<BotIcons> which does not have a default implementation and therefore wouldn't compile.

dten commented 5 years ago

Hmm, I had the same issue trying it. I decided either we should derive default on it or that there's no actual point deriving it. I went with changing optional_struct_or_empty_array to not use default. It doesn't really add anything of value.

dten commented 5 years ago

Not sure why your codegen has produced differently ordered code

bunker-inspector commented 5 years ago

I couldn't tell you. Is the ordering supposed to be guaranteed by something?

dten commented 5 years ago

A bit, it puts things in a map before writing them out. Maps are normally ordered.

dten commented 4 years ago

this was fixed with e286109ae5e5687fc51e7f37265afecb279fbd90