diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-22 08:31:37 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-11-02 09:01:00 +1100 |
| commit | 5bc7084f7e1be9da93bb014e05f19a80ff6fa188 (patch) | |
| tree | 791694964a4af2e1c0f109fb2c423f2e6f9893c5 /src/librustc_incremental/assert_module_sources.rs | |
| parent | 9cf59b517867562ebf7413ca2cda762c6b7d6fc0 (diff) | |
| download | rust-5bc7084f7e1be9da93bb014e05f19a80ff6fa188.tar.gz rust-5bc7084f7e1be9da93bb014e05f19a80ff6fa188.zip | |
Convert `x.as_str().to_string()` to `x.to_string()` where possible.
Diffstat (limited to 'src/librustc_incremental/assert_module_sources.rs')
| -rw-r--r-- | src/librustc_incremental/assert_module_sources.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_incremental/assert_module_sources.rs b/src/librustc_incremental/assert_module_sources.rs index 6150017f957..f740d1a9bfa 100644 --- a/src/librustc_incremental/assert_module_sources.rs +++ b/src/librustc_incremental/assert_module_sources.rs @@ -94,8 +94,8 @@ impl AssertModuleSource<'tcx> { return; } - let user_path = self.field(attr, sym::module).as_str().to_string(); - let crate_name = self.tcx.crate_name(LOCAL_CRATE).as_str().to_string(); + let user_path = self.field(attr, sym::module).to_string(); + let crate_name = self.tcx.crate_name(LOCAL_CRATE).to_string(); if !user_path.starts_with(&crate_name) { let msg = format!("Found malformed codegen unit name `{}`. \ @@ -131,7 +131,7 @@ impl AssertModuleSource<'tcx> { cgu_name, self.available_cgus .iter() - .map(|cgu| cgu.as_str().to_string()) + .map(|cgu| cgu.to_string()) .collect::<Vec<_>>() .join(", "))); } |
