@@ -635,9 +635,9 @@ impl<L: Language, D: ParsedSource<Language = L>> Graph<D> {
635635
636636 if !all_versions. iter ( ) . any ( |v| req. matches ( v. as_ref ( ) ) ) {
637637 return if project. offline {
638- Err ( SourceVersionError :: NoMatchingVersionOffline ( req. clone ( ) ) )
638+ Err ( SourceVersionError :: NoMatchingVersionOffline ( req) )
639639 } else {
640- Err ( SourceVersionError :: NoMatchingVersion ( req. clone ( ) ) )
640+ Err ( SourceVersionError :: NoMatchingVersion ( req) )
641641 } ;
642642 }
643643
@@ -685,9 +685,7 @@ impl<L: Language, D: ParsedSource<Language = L>> Graph<D> {
685685 {
686686 // check if the version is even valid
687687 let f = utils:: source_name ( & failed_node. path , & self . root ) . display ( ) ;
688- return Err (
689- format ! ( "Encountered invalid solc version in {f}: {version_err}" ) . to_string ( )
690- ) ;
688+ return Err ( format ! ( "Encountered invalid solc version in {f}: {version_err}" ) ) ;
691689 } else {
692690 // if the node requirement makes sense, it means that there is at least one node
693691 // which requirement conflicts with it
@@ -757,9 +755,7 @@ impl<L: Language, D: ParsedSource<Language = L>> Graph<D> {
757755
758756 if all_profiles. is_empty ( ) {
759757 let f = utils:: source_name ( & failed_node. path , & self . root ) . display ( ) ;
760- return Err (
761- format ! ( "Missing profile satisfying settings restrictions for {f}" ) . to_string ( )
762- ) ;
758+ return Err ( format ! ( "Missing profile satisfying settings restrictions for {f}" ) ) ;
763759 }
764760
765761 // iterate over all the nodes once again and find the one incompatible
0 commit comments