Skip to content

Commit cd31800

Browse files
Rename render::Type to improve naming
1 parent 1a3358d commit cd31800

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
@@ -303,14 +303,14 @@ impl Serialize for IndexItem {
303303

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

313-
impl Serialize for Type {
313+
impl Serialize for RenderType {
314314
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
315315
where
316316
S: Serializer,
@@ -389,12 +389,12 @@ impl Serialize for IndexItemFunctionType {
389389

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

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

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)