File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
crates/cargo-test-support/src Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -571,6 +571,7 @@ pub struct Package {
571
571
local : bool ,
572
572
alternative : bool ,
573
573
invalid_json : bool ,
574
+ resolver : Option < String > ,
574
575
proc_macro : bool ,
575
576
links : Option < String > ,
576
577
rust_version : Option < String > ,
@@ -1250,6 +1251,7 @@ impl Package {
1250
1251
local : false ,
1251
1252
alternative : false ,
1252
1253
invalid_json : false ,
1254
+ resolver : None ,
1253
1255
proc_macro : false ,
1254
1256
links : None ,
1255
1257
rust_version : None ,
@@ -1385,6 +1387,12 @@ impl Package {
1385
1387
self
1386
1388
}
1387
1389
1390
+ /// Specifies `package.resolver`
1391
+ pub fn resolver ( & mut self , resolver : & str ) -> & mut Package {
1392
+ self . resolver = Some ( resolver. to_owned ( ) ) ;
1393
+ self
1394
+ }
1395
+
1388
1396
/// Specifies whether or not this is a proc macro.
1389
1397
pub fn proc_macro ( & mut self , proc_macro : bool ) -> & mut Package {
1390
1398
self . proc_macro = proc_macro;
@@ -1570,7 +1578,11 @@ impl Package {
1570
1578
) ) ;
1571
1579
1572
1580
if let Some ( version) = & self . rust_version {
1573
- manifest. push_str ( & format ! ( "rust-version = \" {}\" " , version) ) ;
1581
+ manifest. push_str ( & format ! ( "rust-version = \" {}\" \n " , version) ) ;
1582
+ }
1583
+
1584
+ if let Some ( resolver) = & self . resolver {
1585
+ manifest. push_str ( & format ! ( "resolver = \" {}\" \n " , resolver) ) ;
1574
1586
}
1575
1587
1576
1588
if !self . features . is_empty ( ) {
You can’t perform that action at this time.
0 commit comments