| Crates.io | string_literal |
| lib.rs | string_literal |
| version | 0.1.1 |
| created_at | 2022-05-30 17:42:20.862465+00 |
| updated_at | 2022-05-30 17:44:15.801694+00 |
| description | A simple macro that auto insert `.to_string()` call to str literal. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 597088 |
| size | 4,624 |
A simple macro that auto insert .to_string() call to str literal.
It can save many keystrokes while writing test.
s!{
MyStruct {
a: "a",
b: "b",
c: 1,
}
}
will expand to
MyStruct {
a: "a".to_string(),
b: "b".to_string(),
c: 1,
}
Currently embed macro won't work, so you can't use s!{vec!["a","b","c"]}