Sparrow0hawk / sagitta

🦀 A Rust SGE qacct clone
MIT License
1 stars 0 forks source link

Use serde for serialising input data #8

Open Sparrow0hawk opened 1 year ago

Sparrow0hawk commented 1 year ago

The current implementation for creating the JobInfo struct is horrible. We're reading each line, splitting on a colon and collecting to a Vec. This assumes the split has enough items to fit into the expected size of JobInfo by using indexing and does a whole bunch of type coercing.

The serde crate feels like a better way to do this.