Simplify render_spotlight_traits
This commit is contained in:
parent
3f144e119e
commit
aa4055cd6c
1 changed files with 2 additions and 6 deletions
|
@ -3858,19 +3858,15 @@ fn should_render_item(item: &clean::Item, deref_mut_: bool) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_spotlight_traits(item: &clean::Item) -> String {
|
fn render_spotlight_traits(item: &clean::Item) -> String {
|
||||||
let mut out = String::new();
|
|
||||||
|
|
||||||
match item.inner {
|
match item.inner {
|
||||||
clean::FunctionItem(clean::Function { ref decl, .. }) |
|
clean::FunctionItem(clean::Function { ref decl, .. }) |
|
||||||
clean::TyMethodItem(clean::TyMethod { ref decl, .. }) |
|
clean::TyMethodItem(clean::TyMethod { ref decl, .. }) |
|
||||||
clean::MethodItem(clean::Method { ref decl, .. }) |
|
clean::MethodItem(clean::Method { ref decl, .. }) |
|
||||||
clean::ForeignFunctionItem(clean::Function { ref decl, .. }) => {
|
clean::ForeignFunctionItem(clean::Function { ref decl, .. }) => {
|
||||||
out = spotlight_decl(decl);
|
spotlight_decl(decl)
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => String::new()
|
||||||
}
|
}
|
||||||
|
|
||||||
out
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn spotlight_decl(decl: &clean::FnDecl) -> String {
|
fn spotlight_decl(decl: &clean::FnDecl) -> String {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue