Skip to content

Commit 7d1ec64

Browse files
committed
Remove unused parameter
1 parent 5c8e8e5 commit 7d1ec64

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/librustdoc/html/render/search_index.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ crate fn get_function_type_for_search<'tcx>(
200200

201201
fn get_index_type(clean_type: &clean::Type, generics: Vec<TypeWithKind>) -> RenderType {
202202
RenderType {
203-
name: get_index_type_name(clean_type, true).map(|s| s.as_str().to_ascii_lowercase()),
203+
name: get_index_type_name(clean_type).map(|s| s.as_str().to_ascii_lowercase()),
204204
generics: if generics.is_empty() { None } else { Some(generics) },
205205
}
206206
}
207207

208-
fn get_index_type_name(clean_type: &clean::Type, accept_generic: bool) -> Option<Symbol> {
208+
fn get_index_type_name(clean_type: &clean::Type) -> Option<Symbol> {
209209
match *clean_type {
210210
clean::Type::Path { ref path, .. } => {
211211
let path_segment = path.segments.last().unwrap();
@@ -215,11 +215,10 @@ fn get_index_type_name(clean_type: &clean::Type, accept_generic: bool) -> Option
215215
let path = &bounds[0].trait_;
216216
Some(path.segments.last().unwrap().name)
217217
}
218-
clean::Generic(s) if accept_generic => Some(s),
218+
clean::Generic(s) => Some(s),
219219
clean::Primitive(ref p) => Some(p.as_sym()),
220-
clean::BorrowedRef { ref type_, .. } => get_index_type_name(type_, accept_generic),
221-
clean::Generic(_)
222-
| clean::BareFunction(_)
220+
clean::BorrowedRef { ref type_, .. } => get_index_type_name(type_),
221+
clean::BareFunction(_)
223222
| clean::Tuple(_)
224223
| clean::Slice(_)
225224
| clean::Array(_, _)

0 commit comments

Comments
 (0)