diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2021-12-15 14:39:23 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2021-12-15 17:32:14 +1100 |
| commit | 056d48a2c97860b2cce936f310331e606076fa01 (patch) | |
| tree | c456e6021abf01fe5350f022926a9974795c071f /src/librustdoc/html/render/context.rs | |
| parent | 8cddcd39ba2189da859a5164804556190906ee2a (diff) | |
| download | rust-056d48a2c97860b2cce936f310331e606076fa01.tar.gz rust-056d48a2c97860b2cce936f310331e606076fa01.zip | |
Remove unnecessary sigils around `Symbol::as_str()` calls.
Diffstat (limited to 'src/librustdoc/html/render/context.rs')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 6a1c7c03063..c4d326e7711 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -180,7 +180,7 @@ impl<'tcx> Context<'tcx> { fn render_item(&self, it: &clean::Item, is_module: bool) -> String { let mut title = String::new(); if !is_module { - title.push_str(&it.name.unwrap().as_str()); + title.push_str(it.name.unwrap().as_str()); } if !it.is_primitive() && !it.is_keyword() { if !is_module { @@ -549,7 +549,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { fn after_krate(&mut self) -> Result<(), Error> { let crate_name = self.tcx().crate_name(LOCAL_CRATE); - let final_file = self.dst.join(&*crate_name.as_str()).join("all.html"); + let final_file = self.dst.join(crate_name.as_str()).join("all.html"); let settings_file = self.dst.join("settings.html"); let mut root_path = self.dst.to_str().expect("invalid path").to_owned(); @@ -619,9 +619,9 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { if let Some(ref redirections) = self.shared.redirections { if !redirections.borrow().is_empty() { let redirect_map_path = - self.dst.join(&*crate_name.as_str()).join("redirect-map.json"); + self.dst.join(crate_name.as_str()).join("redirect-map.json"); let paths = serde_json::to_string(&*redirections.borrow()).unwrap(); - self.shared.ensure_dir(&self.dst.join(&*crate_name.as_str()))?; + self.shared.ensure_dir(&self.dst.join(crate_name.as_str()))?; self.shared.fs.write(redirect_map_path, paths)?; } } @@ -703,7 +703,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { if !buf.is_empty() { let name = item.name.as_ref().unwrap(); let item_type = item.type_(); - let file_name = &item_path(item_type, &name.as_str()); + let file_name = &item_path(item_type, name.as_str()); self.shared.ensure_dir(&self.dst)?; let joint_dst = self.dst.join(file_name); self.shared.fs.write(joint_dst, buf)?; |
