File tree Expand file tree Collapse file tree 6 files changed +42
-3
lines changed
Expand file tree Collapse file tree 6 files changed +42
-3
lines changed Original file line number Diff line number Diff line change 4343
4444 - run : |
4545 rustup target add thumbv6m-none-eabi
46- cargo build --no-default-features --target thumbv6m-none-eabi
46+ cargo build --target thumbv6m-none-eabi --package boilerplate
47+ cargo build --target thumbv6m-none-eabi --package boilerplate-tests
4748
4849 lint :
4950 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ pub fn boilerplate(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
2828 use :: core:: fmt:: Write ;
2929
3030 let boilerplate_text = & [ #( #text) , * ] ;
31- let mut boilerplate_output = :: std :: string:: String :: new( ) ;
31+ let mut boilerplate_output = :: alloc :: string:: String :: new( ) ;
3232
3333 #body
3434
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " boilerplate-tests"
3+ version = " 0.0.0"
4+ authors.workspace = true
5+ categories.workspace = true
6+ edition.workspace = true
7+ homepage.workspace = true
8+ license.workspace = true
9+ repository.workspace = true
10+
11+ [dependencies ]
12+ boilerplate = { path = " ../../" }
13+
14+ [lints ]
15+ workspace = true
Original file line number Diff line number Diff line change 1+ #![ no_std]
2+
3+ extern crate alloc;
4+
5+ #[ allow( unused) ]
6+ #[ derive( boilerplate:: Boilerplate ) ]
7+ #[ boilerplate( text = "Hello, {{ self.name }}!" ) ]
8+ struct Context {
9+ name : & ' static str ,
10+ }
11+
12+ #[ allow( unused) ]
13+ fn foo ( ) {
14+ boilerplate:: boilerplate!( "Hello!" ) ;
15+ }
Original file line number Diff line number Diff line change 77 cargo test --all
88 cargo test --all --features axum
99 cargo test --all --features reload
10- cargo build --no-default-features --target thumbv6m-none-eabi
10+ cargo build --target thumbv6m-none-eabi --package boilerplate
11+ cargo build --target thumbv6m-none-eabi --package boilerplate-tests
1112
1213# publish current GitHub master branch
1314publish :
You can’t perform that action at this time.
0 commit comments