Skip to content

Commit 6ffe9f3

Browse files
Rename render::Type to improve naming
1 parent 71b9512 commit 6ffe9f3

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 {
@@ -664,8 +664,8 @@ fn get_index_search_type(item: &clean::Item) -> Option<IndexItemFunctionType> {
664664
Some(IndexItemFunctionType { inputs, output })
665665
}
666666

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

0 commit comments

Comments
 (0)