File tree Expand file tree Collapse file tree 1 file changed +34
-4
lines changed Expand file tree Collapse file tree 1 file changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,7 @@ pub(super) fn expand_manifest(
18
18
let source = split_source ( content) ?;
19
19
if let Some ( frontmatter) = source. frontmatter {
20
20
match source. info {
21
- Some ( "cargo" ) => { }
22
- None => {
23
- anyhow:: bail!( "frontmatter is missing an infostring; specify `cargo` for embedding a manifest" ) ;
24
- }
21
+ Some ( "cargo" ) | None => { }
25
22
Some ( other) => {
26
23
if let Some ( remainder) = other. strip_prefix ( "cargo," ) {
27
24
anyhow:: bail!( "cargo does not support frontmatter infostring attributes like `{remainder}` at this time" )
@@ -328,6 +325,39 @@ strip = true
328
325
time="0.1.25"
329
326
```
330
327
fn main() {}
328
+ "# ) ,
329
+ ) ;
330
+ }
331
+
332
+ #[ test]
333
+ fn test_no_infostring ( ) {
334
+ snapbox:: assert_matches (
335
+ r#"[[bin]]
336
+ name = "test-"
337
+ path = [..]
338
+
339
+ [dependencies]
340
+ time = "0.1.25"
341
+
342
+ [package]
343
+ autobenches = false
344
+ autobins = false
345
+ autoexamples = false
346
+ autotests = false
347
+ build = false
348
+ edition = "2021"
349
+ name = "test-"
350
+
351
+ [profile.release]
352
+ strip = true
353
+
354
+ [workspace]
355
+ "# ,
356
+ si ! ( r#"```
357
+ [dependencies]
358
+ time="0.1.25"
359
+ ```
360
+ fn main() {}
331
361
"# ) ,
332
362
) ;
333
363
}
You can’t perform that action at this time.
0 commit comments