Remove unnecessary sigils around Symbol::as_str() calls.
This commit is contained in:
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user