I am passing a label to nodes of a graph. Some names are known at compile time (i.e. the “…”.to_string()). Others are generated at runtime (concatting other names / numbers). I don’t think the later ones can be repalced with &str, and I really do need String in this case.
For a function that takes a String as an argument, is it a way to tell it to “auto .to_string” any &str arguments?
When writing a literal “foobar”, the .to_string() breaks the flow of the arguments, makes the line longer, and in general, less pleasant to read.