-
-
Notifications
You must be signed in to change notification settings - Fork 194
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Currently in builders (such as LabelBuilder), css_classes requires a Vec<String>, which is quite annoying to use, with snippets such as these littered throughout my codebase (this isn't an actual example, but it shows the point):
...
.css_classes(vec!["background".to_string(), "error".to_string()])The fact that I have to run .to_string() really makes it messier. It would be nicer if I could just pass in &str references so I could do this:
...
.css_classes(vec!["background", "error")])It probably wouldn't be best to just break things though - maybe a Vec<impl ToString> or Vec<impl AsRef<str>> could be passed instead? I just don't really want to have to be typing .to_string() everywhere, and I don't really see any reason why it'd have to stay as such.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request