ci(build-channel): create types to represent data used in build-channel script
- Dominant language
- Rust
- Stars
- 282
- Forks
- 150
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 2
Description
> Rather than writing directly to the toml document, one alternative approach that might be a bit more type-safe is to create a Rust type to represent the data you want, populate that, then serialize that type to `toml` afterwards. This helps to avoid typos in strings, and you get the side-benefit of being able to use the same type for deserialization.
_Originally posted by @mitchmindtree in https://github.com/FuelLabs/fuelup/pull/337#discussion_r1071718044_
This would involve creating structs for some of the usages of `toml_edit::value` ([example](https://github.com/FuelLabs/fuelup/blob/8ca26c1378112d79df733d62a4caef85816c3970/ci/build-channel/src/main.rs#L146)), eg. a `Channel`, then serializing the `Channel`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.