Skip to content

A simple macro that auto insert `.to_string()` call to str literal.

License

Notifications You must be signed in to change notification settings

zoritle/string_literal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

String Literal

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,
}

TODO

Currently embed macro won't work, so you can't use s!{vec!["a","b","c"]}

similar project

overload-strings

About

A simple macro that auto insert `.to_string()` call to str literal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages