1 stable release
1.0.1 | Nov 29, 2024 |
---|
#753 in Rust patterns
264 downloads per month
2KB
the-string-macro
We all have been tired arguing about which of the following is the best practice:
"foo".to_owned()
"foo".to_string()
String::from("foo")
format!("foo")
It's time to finish this...
Usage
the-string-macro = "1"
use the_string_macro::string;
let s = string!("foo");
let props = vec![
Foo {
key: string!("key1"),
value: string!("value1"),
}
];