1
Fork 0

Use ItemType in cache

This commit is contained in:
Joshua Nelson 2021-04-22 21:27:19 -04:00
parent 1481af9f59
commit f3ef4b2cef
4 changed files with 11 additions and 32 deletions

View file

@ -54,7 +54,7 @@ use rustc_span::symbol::{kw, sym, Symbol};
use serde::ser::SerializeSeq;
use serde::{Serialize, Serializer};
use crate::clean::{self, GetDefId, RenderedLink, SelfTy, TypeKind};
use crate::clean::{self, GetDefId, RenderedLink, SelfTy};
use crate::docfs::PathError;
use crate::error::Error;
use crate::formats::cache::Cache;
@ -182,11 +182,11 @@ impl Serialize for IndexItemFunctionType {
#[derive(Debug)]
crate struct TypeWithKind {
ty: RenderType,
kind: TypeKind,
kind: ItemType,
}
impl From<(RenderType, TypeKind)> for TypeWithKind {
fn from(x: (RenderType, TypeKind)) -> TypeWithKind {
impl From<(RenderType, ItemType)> for TypeWithKind {
fn from(x: (RenderType, ItemType)) -> TypeWithKind {
TypeWithKind { ty: x.0, kind: x.1 }
}
}
@ -196,7 +196,7 @@ impl Serialize for TypeWithKind {
where
S: Serializer,
{
(&self.ty.name, ItemType::from(self.kind)).serialize(serializer)
(&self.ty.name, self.kind).serialize(serializer)
}
}