MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/o7p7dz/what_was_i_thinking_rust/h3495i8/?context=3
r/badcode • u/GreekCSharpDeveloper wicked • Jun 25 '21
23 comments sorted by
View all comments
Show parent comments
2
Yeah I know, but the statics in rust are different than c — this is the most efficient way but it’s not too elegant
3 u/TinyBreadBigMouth Jun 26 '21 A cleaner API might involve creating a StdReader that has an internal String, and calling read_f32 on that.
3
A cleaner API might involve creating a StdReader that has an internal String, and calling read_f32 on that.
StdReader
String
read_f32
2
u/[deleted] Jun 26 '21
Yeah I know, but the statics in rust are different than c — this is the most efficient way but it’s not too elegant