@@ -395,10 +395,7 @@ mod tests {
395395 // This is expected when workspace inheritance fails due to
396396 // missing workspace
397397 }
398- _ => panic ! (
399- "Expected MissingInheritedValue or CargoTomlError, got: {:?}" ,
400- error
401- ) ,
398+ _ => panic ! ( "Expected MissingInheritedValue or CargoTomlError, got: {error:?}" ) ,
402399 }
403400 }
404401
@@ -417,10 +414,7 @@ mod tests {
417414 // This is expected when workspace inheritance fails due to
418415 // missing workspace
419416 }
420- _ => panic ! (
421- "Expected MissingInheritedValue or CargoTomlError, got: {:?}" ,
422- error
423- ) ,
417+ _ => panic ! ( "Expected MissingInheritedValue or CargoTomlError, got: {error:?}" ) ,
424418 }
425419 }
426420
@@ -672,8 +666,7 @@ version.workspace = true
672666 assert_eq ! (
673667 globs. len( ) ,
674668 1 ,
675- "Expected only Cargo.toml glob when workspace is in same file, got: {:?}" ,
676- globs
669+ "Expected only Cargo.toml glob when workspace is in same file, got: {globs:?}"
677670 ) ;
678671 }
679672
@@ -723,8 +716,7 @@ description.workspace = true
723716 // is detected
724717 assert ! (
725718 globs. len( ) >= 2 ,
726- "Expected at least 2 globs when workspace is in separate file, got: {:?}" ,
727- globs
719+ "Expected at least 2 globs when workspace is in separate file, got: {globs:?}"
728720 ) ;
729721
730722 // Check that a workspace-related glob pattern is included
@@ -733,8 +725,7 @@ description.workspace = true
733725 . any ( |glob| glob. contains ( "../Cargo.toml" ) && glob != "Cargo.toml" ) ;
734726 assert ! (
735727 has_workspace_glob,
736- "Expected workspace glob pattern, got: {:?}" ,
737- globs
728+ "Expected workspace glob pattern, got: {globs:?}"
738729 ) ;
739730 }
740731
@@ -756,8 +747,7 @@ version = "1.0.0"
756747 assert_eq ! (
757748 globs. len( ) ,
758749 1 ,
759- "Expected exactly 1 glob when no workspace is present, got: {:?}" ,
760- globs
750+ "Expected exactly 1 glob when no workspace is present, got: {globs:?}"
761751 ) ;
762752 assert ! ( globs. contains( "Cargo.toml" ) ) ;
763753
@@ -767,8 +757,7 @@ version = "1.0.0"
767757 . any ( |glob| glob. contains ( "**/Cargo.toml" ) && glob != "Cargo.toml" ) ;
768758 assert ! (
769759 !has_workspace_glob,
770- "No workspace globs should be present when no workspace inheritance occurs, got: {:?}" ,
771- globs
760+ "No workspace globs should be present when no workspace inheritance occurs, got: {globs:?}"
772761 ) ;
773762 }
774763
@@ -804,8 +793,7 @@ description = "Direct package values"
804793 assert_eq ! (
805794 globs. len( ) ,
806795 1 ,
807- "Expected exactly 1 glob when workspace exists but no inheritance is used, got: {:?}" ,
808- globs
796+ "Expected exactly 1 glob when workspace exists but no inheritance is used, got: {globs:?}"
809797 ) ;
810798 assert ! ( globs. contains( "Cargo.toml" ) ) ;
811799 }
@@ -857,7 +845,7 @@ version = "not.a.valid.version.at.all"
857845 Err ( MetadataError :: ParseVersionError ( _) ) => {
858846 // This is the expected error case
859847 }
860- other => panic ! ( "Unexpected result: {:?}" , other ) ,
848+ other => panic ! ( "Unexpected result: {other :?}" ) ,
861849 }
862850 }
863851
@@ -876,7 +864,7 @@ version = "1.0.0"
876864 assert ! ( result. is_err( ) ) ;
877865 match result. unwrap_err ( ) {
878866 MetadataError :: CargoTomlError ( _) => { }
879- err => panic ! ( "Expected CargoTomlError, got: {:?}" , err ) ,
867+ err => panic ! ( "Expected CargoTomlError, got: {err :?}" ) ,
880868 }
881869 }
882870}
0 commit comments