@@ -3450,15 +3450,15 @@ mod tests {
34503450 let s = remove_ws ( & schema) ;
34513451 if !p. contains ( & s) {
34523452 package_json. replace_range ( start..end, & schema) ;
3453- ensure_file_contents ( & package_json_path, & package_json)
3453+ ensure_file_contents ( package_json_path. as_std_path ( ) , & package_json)
34543454 }
34553455 }
34563456
34573457 #[ test]
34583458 fn generate_config_documentation ( ) {
34593459 let docs_path = project_root ( ) . join ( "docs/user/generated_config.adoc" ) ;
34603460 let expected = FullConfigInput :: manual ( ) ;
3461- ensure_file_contents ( & docs_path, & expected) ;
3461+ ensure_file_contents ( docs_path. as_std_path ( ) , & expected) ;
34623462 }
34633463
34643464 fn remove_ws ( text : & str ) -> String {
@@ -3467,13 +3467,8 @@ mod tests {
34673467
34683468 #[ test]
34693469 fn proc_macro_srv_null ( ) {
3470- let mut config = Config :: new (
3471- AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
3472- Default :: default ( ) ,
3473- vec ! [ ] ,
3474- None ,
3475- None ,
3476- ) ;
3470+ let mut config =
3471+ Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None , None ) ;
34773472
34783473 let mut change = ConfigChange :: default ( ) ;
34793474 change. change_client_config ( serde_json:: json!( {
@@ -3487,32 +3482,22 @@ mod tests {
34873482
34883483 #[ test]
34893484 fn proc_macro_srv_abs ( ) {
3490- let mut config = Config :: new (
3491- AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
3492- Default :: default ( ) ,
3493- vec ! [ ] ,
3494- None ,
3495- None ,
3496- ) ;
3485+ let mut config =
3486+ Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None , None ) ;
34973487 let mut change = ConfigChange :: default ( ) ;
34983488 change. change_client_config ( serde_json:: json!( {
34993489 "procMacro" : {
3500- "server" : project_root( ) . display ( ) . to_string( ) ,
3490+ "server" : project_root( ) . to_string( ) ,
35013491 } } ) ) ;
35023492
35033493 ( config, _, _) = config. apply_change ( change) ;
3504- assert_eq ! ( config. proc_macro_srv( ) , Some ( AbsPathBuf :: try_from ( project_root( ) ) . unwrap ( ) ) ) ;
3494+ assert_eq ! ( config. proc_macro_srv( ) , Some ( AbsPathBuf :: assert ( project_root( ) ) ) ) ;
35053495 }
35063496
35073497 #[ test]
35083498 fn proc_macro_srv_rel ( ) {
3509- let mut config = Config :: new (
3510- AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
3511- Default :: default ( ) ,
3512- vec ! [ ] ,
3513- None ,
3514- None ,
3515- ) ;
3499+ let mut config =
3500+ Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None , None ) ;
35163501
35173502 let mut change = ConfigChange :: default ( ) ;
35183503
@@ -3531,13 +3516,8 @@ mod tests {
35313516
35323517 #[ test]
35333518 fn cargo_target_dir_unset ( ) {
3534- let mut config = Config :: new (
3535- AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
3536- Default :: default ( ) ,
3537- vec ! [ ] ,
3538- None ,
3539- None ,
3540- ) ;
3519+ let mut config =
3520+ Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None , None ) ;
35413521
35423522 let mut change = ConfigChange :: default ( ) ;
35433523
@@ -3554,13 +3534,8 @@ mod tests {
35543534
35553535 #[ test]
35563536 fn cargo_target_dir_subdir ( ) {
3557- let mut config = Config :: new (
3558- AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
3559- Default :: default ( ) ,
3560- vec ! [ ] ,
3561- None ,
3562- None ,
3563- ) ;
3537+ let mut config =
3538+ Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None , None ) ;
35643539
35653540 let mut change = ConfigChange :: default ( ) ;
35663541 change. change_client_config ( serde_json:: json!( {
@@ -3577,13 +3552,8 @@ mod tests {
35773552
35783553 #[ test]
35793554 fn cargo_target_dir_relative_dir ( ) {
3580- let mut config = Config :: new (
3581- AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
3582- Default :: default ( ) ,
3583- vec ! [ ] ,
3584- None ,
3585- None ,
3586- ) ;
3555+ let mut config =
3556+ Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None , None ) ;
35873557
35883558 let mut change = ConfigChange :: default ( ) ;
35893559 change. change_client_config ( serde_json:: json!( {
@@ -3603,13 +3573,8 @@ mod tests {
36033573
36043574 #[ test]
36053575 fn toml_unknown_key ( ) {
3606- let config = Config :: new (
3607- AbsPathBuf :: try_from ( project_root ( ) ) . unwrap ( ) ,
3608- Default :: default ( ) ,
3609- vec ! [ ] ,
3610- None ,
3611- None ,
3612- ) ;
3576+ let config =
3577+ Config :: new ( AbsPathBuf :: assert ( project_root ( ) ) , Default :: default ( ) , vec ! [ ] , None , None ) ;
36133578
36143579 let mut change = ConfigChange :: default ( ) ;
36153580
0 commit comments