Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 93 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ serde_json = "1.0"
rust_team_data = { git = "https://github.com/rust-lang/team" }
percent-encoding = "2.3.2"
rayon = "1"
rand = "0.9"

[dev-dependencies]
time = { version = "0.3.44", features = ["parsing"] }
10 changes: 9 additions & 1 deletion src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::{BaseUrl, ENGLISH, LAYOUT};
use anyhow::Context;
use handlebars::Handlebars;
use handlebars_fluent::{Loader, SimpleLoader};
use rand::seq::SliceRandom;
use rayon::iter::IntoParallelRefIterator;
use rayon::iter::ParallelIterator;
use serde::Serialize;
Expand Down Expand Up @@ -269,7 +270,14 @@ pub fn render_funding(
render_ctx: &RenderCtx,
all_team_members: &AllTeamMembers,
) -> anyhow::Result<()> {
let data = render_ctx.teams.funding_data(all_team_members);
let mut data = render_ctx.teams.funding_data(all_team_members);

// To reduce unnecessary ordering bias, we shuffle the list of fundable people.
// While we also shuffle on the client (frontend), this does not work for people
// with JavaScript enabled. And since the website is rebuilt regularly every day,
// this ensures that even the baseline version of the page without client-side
// shuffling will not always be the same.
data.people.shuffle(&mut rand::rng());

// Index page
for_all_langs("funding/index.html", |dst_path, lang| {
Expand Down
2 changes: 1 addition & 1 deletion src/teams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ pub struct FundablePerson {

#[derive(Serialize)]
pub struct FundingData {
people: Vec<FundablePerson>,
pub people: Vec<FundablePerson>,
}

pub fn load_rust_teams() -> anyhow::Result<RustTeamData> {
Expand Down