Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: thank sponsors #345

Merged
merged 1 commit into from
Aug 14, 2022
Merged
Changes from all commits
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
10 changes: 8 additions & 2 deletions src/alejandra_cli/src/ads/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use rand::rngs::OsRng;
pub(crate) fn random_ad() -> String {
let ads = [
// 90% distributed proportional to total past and present contributions
// (0.9001, sponsor_benefits as fn() -> String),
(0.9001, sponsor_benefits as fn() -> String),
// 10% is reserved for everything else
(0.0333, contributor_thanks as fn() -> String),
(0.0333, please_sponsor as fn() -> String),
Expand All @@ -22,7 +22,13 @@ fn sponsor_benefits() -> String {
Company { ad: &'a str },
}

let sponsors = [];
let sponsors = [
// Proportional to total past and present contributions
(0.1247, Sponsor::Individual { name: "GuangTao Zhang" }),
(0.1468, Sponsor::Individual { name: "Fabio Leimgruber" }),
(0.2495, Sponsor::Individual { name: "Raphael Megzari" }),
(0.4790, Sponsor::Individual { name: "Daniel Salazar" }),
];

match random_weighted_choice(&sponsors[..]) {
Sponsor::Company { ad } => {
Expand Down