diff options
| author | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-04-09 20:51:52 +0800 |
|---|---|---|
| committer | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-04-09 20:51:52 +0800 |
| commit | 32c8f7dbcf17e8a97a3a99e112e86a604d12f0a2 (patch) | |
| tree | e1f5757960a870cfefcbbf286db5f807c5319eb2 /src/librustdoc/html | |
| parent | e89c84913690bad837b658ade502cb0af7df768b (diff) | |
| download | rust-32c8f7dbcf17e8a97a3a99e112e86a604d12f0a2.tar.gz rust-32c8f7dbcf17e8a97a3a99e112e86a604d12f0a2.zip | |
librustdoc: remove IndexItem::new, use previous fields constructor
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index b9a2e65b090..ad6fa110ae8 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -113,50 +113,18 @@ enum RenderMode { /// by hand to a large JS file at the end of cache-creation. #[derive(Debug)] pub(crate) struct IndexItem { - ty: ItemType, - defid: Option<DefId>, - name: Symbol, - path: String, - desc: String, - parent: Option<DefId>, - parent_idx: Option<isize>, - exact_path: Option<String>, - impl_id: Option<DefId>, - search_type: Option<IndexItemFunctionType>, - aliases: Box<[Symbol]>, - deprecation: Option<Deprecation>, -} - -impl IndexItem { - pub fn new( - ty: ItemType, - defid: Option<DefId>, - name: Symbol, - path: String, - desc: String, - parent: Option<DefId>, - parent_idx: Option<isize>, - exact_path: Option<String>, - impl_id: Option<DefId>, - search_type: Option<IndexItemFunctionType>, - aliases: Box<[Symbol]>, - deprecation: Option<Deprecation>, - ) -> Self { - Self { - ty, - defid, - name, - path, - desc, - parent, - parent_idx, - exact_path, - impl_id, - search_type, - aliases, - deprecation, - } - } + pub(crate) ty: ItemType, + pub(crate) defid: Option<DefId>, + pub(crate) name: Symbol, + pub(crate) path: String, + pub(crate) desc: String, + pub(crate) parent: Option<DefId>, + pub(crate) parent_idx: Option<isize>, + pub(crate) exact_path: Option<String>, + pub(crate) impl_id: Option<DefId>, + pub(crate) search_type: Option<IndexItemFunctionType>, + pub(crate) aliases: Box<[Symbol]>, + pub(crate) deprecation: Option<Deprecation>, } /// A type used for the search index. |
