Skip to content

Commit d964e60

Browse files
Rename render::Type to improve naming
1 parent 5654cde commit d964e60

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/librustdoc/html/render.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,14 @@ impl Serialize for IndexItem {
302302

303303
/// A type used for the search index.
304304
#[derive(Debug)]
305-
struct Type {
305+
struct RenderType {
306306
ty: Option<DefId>,
307307
idx: Option<usize>,
308308
name: Option<String>,
309309
generics: Option<Vec<Generic>>,
310310
}
311311

312-
impl Serialize for Type {
312+
impl Serialize for RenderType {
313313
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
314314
where
315315
S: Serializer,
@@ -388,12 +388,12 @@ impl Serialize for IndexItemFunctionType {
388388

389389
#[derive(Debug)]
390390
pub struct TypeWithKind {
391-
ty: Type,
391+
ty: RenderType,
392392
kind: TypeKind,
393393
}
394394

395-
impl From<(Type, TypeKind)> for TypeWithKind {
396-
fn from(x: (Type, TypeKind)) -> TypeWithKind {
395+
impl From<(RenderType, TypeKind)> for TypeWithKind {
396+
fn from(x: (RenderType, TypeKind)) -> TypeWithKind {
397397
TypeWithKind { ty: x.0, kind: x.1 }
398398
}
399399
}

src/librustdoc/html/render/cache.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::path::{Path, PathBuf};
1212
use serde::Serialize;
1313

1414
use super::{plain_summary_line, shorten, Impl, IndexItem, IndexItemFunctionType, ItemType};
15-
use super::{Generic, RenderInfo, Type, TypeWithKind};
15+
use super::{Generic, RenderInfo, RenderType, TypeWithKind};
1616

1717
/// Indicates where an external crate can be found.
1818
pub enum ExternalLocation {
@@ -665,8 +665,8 @@ fn get_index_search_type(item: &clean::Item) -> Option<IndexItemFunctionType> {
665665
Some(IndexItemFunctionType { inputs, output })
666666
}
667667

668-
fn get_index_type(clean_type: &clean::Type) -> Type {
669-
let t = Type {
668+
fn get_index_type(clean_type: &clean::Type) -> RenderType {
669+
let t = RenderType {
670670
ty: clean_type.def_id(),
671671
idx: None,
672672
name: get_index_type_name(clean_type, true).map(|s| s.to_ascii_lowercase()),

0 commit comments

Comments
 (0)