4 ms·
Well let’s say you read command line args into a Vec<String> and then you want to use each in some Foo struct, but you want to avoid clones, so you make the fie
by andrenth 8y ago
Well let’s say you read command line args into a Vec<String> and then you want to use each in some Foo struct, but you want to avoid clones, so you make the field a &str. Now your Foo must become Foo<‘a> everywhere.
I understand the guarantees, it’s just the syntactic overhead that annoys me.