Rollup merge of #86608 - notriddle:notriddle/cleanup-rustdoc, r=jyn514
chore(rustdoc): remove unused members of RenderType PR #86561 removes the only place the `generics` member is read. This PR does even more cleanup.
This commit is contained in:
commit
daa87adc4e
3 changed files with 7 additions and 52 deletions
|
@ -95,31 +95,7 @@ crate struct IndexItem {
|
|||
/// A type used for the search index.
|
||||
#[derive(Debug)]
|
||||
crate struct RenderType {
|
||||
ty: Option<DefId>,
|
||||
idx: Option<usize>,
|
||||
name: Option<String>,
|
||||
generics: Option<Vec<Generic>>,
|
||||
}
|
||||
|
||||
/// A type used for the search index.
|
||||
#[derive(Debug)]
|
||||
crate struct Generic {
|
||||
name: String,
|
||||
defid: Option<DefId>,
|
||||
idx: Option<usize>,
|
||||
}
|
||||
|
||||
impl Serialize for Generic {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: Serializer,
|
||||
{
|
||||
if let Some(id) = self.idx {
|
||||
serializer.serialize_some(&id)
|
||||
} else {
|
||||
serializer.serialize_some(&self.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Full type of functions/methods in the search index.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue