File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 151151 },
152152
153153 {
154- "label" : " Cargo: Install crates" ,
154+ "label" : " Cargo: Install crates (impl crate) " ,
155155 "icon" : {
156156 "id" : " package" ,
157157 "color" : " terminal.ansiYellow"
170170 "problemMatcher" : []
171171 },
172172
173+ {
174+ "label" : " Cargo: Install crates (tests crate)" ,
175+ "icon" : {
176+ "id" : " package" ,
177+ "color" : " terminal.ansiYellow"
178+ },
179+
180+ "type" : " shell" ,
181+ "command" : " cargo add -p error-stack-macros2-tests ${input:crates}" ,
182+
183+ "isBackground" : false ,
184+ "presentation" : {
185+ "echo" : false ,
186+ "panel" : " dedicated" ,
187+ "showReuseMessage" : false
188+ },
189+
190+ "problemMatcher" : []
191+ },
192+
173193 {
174194 "label" : " RustFMT: Format" ,
175195 "icon" : {
Original file line number Diff line number Diff line change 11[workspace ]
2- members = [" impl" ]
2+ members = [" impl" , " tests " ]
33resolver = " 3"
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " error-stack-macros2-tests"
3+ version = " 0.0.0-reserved"
4+ authors = [" LuisFerLCC" ]
5+ edition = " 2024"
6+ rust-version = " 1.90.0"
7+ publish = false
8+
9+
10+ [dependencies ]
11+ error-stack = " 0.6.0"
12+ error-stack-macros2 = { path = " ../impl" }
13+
14+ [lints .rust ]
15+ single_use_lifetimes = " warn"
16+ unconditional_recursion = " deny"
17+ unit_bindings = " warn"
18+ unnameable_types = " warn"
19+ unreachable_pub = " warn"
20+ unsafe_code = " deny"
21+ unused_lifetimes = " warn"
22+
23+ [lints .clippy ]
24+ unwrap_used = " warn"
25+ expect_used = " warn"
26+ panic = " warn"
Original file line number Diff line number Diff line change 1+ pub fn add ( left : u64 , right : u64 ) -> u64 {
2+ left + right
3+ }
4+
5+ #[ cfg( test) ]
6+ mod tests {
7+ use super :: * ;
8+
9+ #[ test]
10+ fn it_works ( ) {
11+ let result = add ( 2 , 2 ) ;
12+ assert_eq ! ( result, 4 ) ;
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments