Skip to content

Commit 98ddff6

Browse files
committed
use u8 for badge color index
1 parent bfb75d9 commit 98ddff6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/librustdoc/html/render/print_item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct NotableTraitBadgeVars {
5959
/// Relative URL to the trait page, or `None` when not linkable.
6060
href: Option<String>,
6161
/// Index of the `.notable-trait-badge-{n}` color class.
62-
color_index: u64,
62+
color_index: u8,
6363
}
6464

6565
#[derive(Template)]
@@ -132,7 +132,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item) -> impl fmt::Disp
132132
// This won't be stable between releases though.
133133
let mut h = DefaultHasher::new();
134134
info.full_path.hash(&mut h);
135-
const BADGE_COLORS: u64 = 6;
135+
const BADGE_COLORS: u8 = 6;
136136
let color_index = h.finish() % BADGE_COLORS;
137137
NotableTraitBadgeVars {
138138
name: info.name,

0 commit comments

Comments
 (0)