docs: drop crates:: from implements/implementors list
@@ -336,7 +336,12 @@ fn create_object_doc(w: &mut dyn Write, env: &Env, info: &analysis::object::Info
let mut implementors = std::iter::once(info.type_id)
.chain(env.class_hierarchy.subtypes(info.type_id))
.filter(|&tid| !env.type_status(&tid.full_name(&env.library)).ignored())
- .map(|tid| format!("[`struct@crate::{}`]", env.library.type_(tid).get_name()))
+ .map(|tid| {
+ format!(
+ "[{name}](crate::{name})",
+ name = env.library.type_(tid).get_name()
+ )
+ })
.collect::<Vec<_>>();
implementors.sort();
@@ -768,11 +773,11 @@ fn get_type_trait_for_implements(env: &Env, tid: TypeId) -> String {
format!("{}Ext", env.library.type_(tid).get_name())
};
if tid.ns_id == MAIN_NAMESPACE {
- format!("[`trait@crate::prelude::{}`]", &trait_name)
+ format!("[{name}](crate::prelude::{name})", name = &trait_name)
} else if let Some(symbol) = env.symbols.borrow().by_tid(tid) {
let mut symbol = symbol.clone();
symbol.make_trait(&trait_name);
- format!("[`trait@{}`]", &symbol.full_rust_name())
+ format!("[{name}](trait@{name})", name = &symbol.full_rust_name())
} else {
error!("Type {} doesn't have crate", tid.full_name(&env.library));
format!("`{}`", trait_name)
@@ -799,6 +804,6 @@ pub fn get_type_manual_traits_for_implements(
manual_trait_iters
.into_iter()
.flatten()
- .map(|name| format!("[`trait@crate::prelude::{}`]", name))
+ .map(|name| format!("[{name}](trait@crate::prelude::{name})", name = name))
.collect()
}
