@@ -178,13 +178,13 @@ impl FixtureWithProjectMeta {
178178
179179 if let Some ( meta) = fixture. strip_prefix ( "//- toolchain:" ) {
180180 let ( meta, remain) = meta. split_once ( '\n' ) . unwrap ( ) ;
181- toolchain = Some ( meta. trim ( ) . to_string ( ) ) ;
181+ toolchain = Some ( meta. trim ( ) . to_owned ( ) ) ;
182182 fixture = remain;
183183 }
184184
185185 if let Some ( meta) = fixture. strip_prefix ( "//- proc_macros:" ) {
186186 let ( meta, remain) = meta. split_once ( '\n' ) . unwrap ( ) ;
187- proc_macro_names = meta. split ( ',' ) . map ( |it| it. trim ( ) . to_string ( ) ) . collect ( ) ;
187+ proc_macro_names = meta. split ( ',' ) . map ( |it| it. trim ( ) . to_owned ( ) ) . collect ( ) ;
188188 fixture = remain;
189189 }
190190
@@ -234,7 +234,7 @@ impl FixtureWithProjectMeta {
234234 let meta = meta[ "//-" . len ( ) ..] . trim ( ) ;
235235 let mut components = meta. split_ascii_whitespace ( ) ;
236236
237- let path = components. next ( ) . expect ( "fixture meta must start with a path" ) . to_string ( ) ;
237+ let path = components. next ( ) . expect ( "fixture meta must start with a path" ) . to_owned ( ) ;
238238 assert ! ( path. starts_with( '/' ) , "fixture path does not start with `/`: {path:?}" ) ;
239239
240240 let mut krate = None ;
@@ -246,7 +246,7 @@ impl FixtureWithProjectMeta {
246246 let mut introduce_new_source_root = None ;
247247 let mut library = false ;
248248 let mut target_data_layout = Some (
249- "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" . to_string ( ) ,
249+ "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" . to_owned ( ) ,
250250 ) ;
251251 for component in components {
252252 if component == "library" {
@@ -257,22 +257,22 @@ impl FixtureWithProjectMeta {
257257 let ( key, value) =
258258 component. split_once ( ':' ) . unwrap_or_else ( || panic ! ( "invalid meta line: {meta:?}" ) ) ;
259259 match key {
260- "crate" => krate = Some ( value. to_string ( ) ) ,
261- "deps" => deps = value. split ( ',' ) . map ( |it| it. to_string ( ) ) . collect ( ) ,
260+ "crate" => krate = Some ( value. to_owned ( ) ) ,
261+ "deps" => deps = value. split ( ',' ) . map ( |it| it. to_owned ( ) ) . collect ( ) ,
262262 "extern-prelude" => {
263263 if value. is_empty ( ) {
264264 extern_prelude = Some ( Vec :: new ( ) ) ;
265265 } else {
266266 extern_prelude =
267- Some ( value. split ( ',' ) . map ( |it| it. to_string ( ) ) . collect :: < Vec < _ > > ( ) ) ;
267+ Some ( value. split ( ',' ) . map ( |it| it. to_owned ( ) ) . collect :: < Vec < _ > > ( ) ) ;
268268 }
269269 }
270- "edition" => edition = Some ( value. to_string ( ) ) ,
270+ "edition" => edition = Some ( value. to_owned ( ) ) ,
271271 "cfg" => {
272272 for entry in value. split ( ',' ) {
273273 match entry. split_once ( '=' ) {
274- Some ( ( k, v) ) => cfgs. push ( ( k. to_string ( ) , Some ( v. to_string ( ) ) ) ) ,
275- None => cfgs. push ( ( entry. to_string ( ) , None ) ) ,
274+ Some ( ( k, v) ) => cfgs. push ( ( k. to_owned ( ) , Some ( v. to_owned ( ) ) ) ) ,
275+ None => cfgs. push ( ( entry. to_owned ( ) , None ) ) ,
276276 }
277277 }
278278 }
@@ -283,8 +283,8 @@ impl FixtureWithProjectMeta {
283283 }
284284 }
285285 }
286- "new_source_root" => introduce_new_source_root = Some ( value. to_string ( ) ) ,
287- "target_data_layout" => target_data_layout = Some ( value. to_string ( ) ) ,
286+ "new_source_root" => introduce_new_source_root = Some ( value. to_owned ( ) ) ,
287+ "target_data_layout" => target_data_layout = Some ( value. to_owned ( ) ) ,
288288 _ => panic ! ( "bad component: {component:?}" ) ,
289289 }
290290 }
@@ -381,7 +381,7 @@ impl MiniCore {
381381 let ( flag, deps) = line. split_once ( ':' ) . unwrap ( ) ;
382382 let flag = flag. trim ( ) ;
383383
384- self . valid_flags . push ( flag. to_string ( ) ) ;
384+ self . valid_flags . push ( flag. to_owned ( ) ) ;
385385 implications. extend (
386386 iter:: repeat ( flag)
387387 . zip ( deps. split ( ", " ) . map ( str:: trim) . filter ( |dep| !dep. is_empty ( ) ) ) ,
@@ -401,7 +401,7 @@ impl MiniCore {
401401 let mut changed = false ;
402402 for & ( u, v) in & implications {
403403 if self . has_flag ( u) && !self . has_flag ( v) {
404- self . activated_flags . push ( v. to_string ( ) ) ;
404+ self . activated_flags . push ( v. to_owned ( ) ) ;
405405 changed = true ;
406406 }
407407 }
@@ -486,9 +486,9 @@ fn parse_fixture_gets_full_meta() {
486486mod m;
487487"# ,
488488 ) ;
489- assert_eq ! ( toolchain, Some ( "nightly" . to_string ( ) ) ) ;
490- assert_eq ! ( proc_macro_names, vec![ "identity" . to_string ( ) ] ) ;
491- assert_eq ! ( mini_core. unwrap( ) . activated_flags, vec![ "coerce_unsized" . to_string ( ) ] ) ;
489+ assert_eq ! ( toolchain, Some ( "nightly" . to_owned ( ) ) ) ;
490+ assert_eq ! ( proc_macro_names, vec![ "identity" . to_owned ( ) ] ) ;
491+ assert_eq ! ( mini_core. unwrap( ) . activated_flags, vec![ "coerce_unsized" . to_owned ( ) ] ) ;
492492 assert_eq ! ( 1 , parsed. len( ) ) ;
493493
494494 let meta = & parsed[ 0 ] ;
0 commit comments