File tree 1 file changed +8
-2
lines changed
src/alejandra_cli/src/ads
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use rand::rngs::OsRng;
5
5
pub ( crate ) fn random_ad ( ) -> String {
6
6
let ads = [
7
7
// 90% distributed proportional to total past and present contributions
8
- // (0.9001, sponsor_benefits as fn() -> String),
8
+ ( 0.9001 , sponsor_benefits as fn ( ) -> String ) ,
9
9
// 10% is reserved for everything else
10
10
( 0.0333 , contributor_thanks as fn ( ) -> String ) ,
11
11
( 0.0333 , please_sponsor as fn ( ) -> String ) ,
@@ -22,7 +22,13 @@ fn sponsor_benefits() -> String {
22
22
Company { ad : & ' a str } ,
23
23
}
24
24
25
- let sponsors = [ ] ;
25
+ let sponsors = [
26
+ // Proportional to total past and present contributions
27
+ ( 0.1247 , Sponsor :: Individual { name : "GuangTao Zhang" } ) ,
28
+ ( 0.1468 , Sponsor :: Individual { name : "Fabio Leimgruber" } ) ,
29
+ ( 0.2495 , Sponsor :: Individual { name : "Raphael Megzari" } ) ,
30
+ ( 0.4790 , Sponsor :: Individual { name : "Daniel Salazar" } ) ,
31
+ ] ;
26
32
27
33
match random_weighted_choice ( & sponsors[ ..] ) {
28
34
Sponsor :: Company { ad } => {
You can’t perform that action at this time.
0 commit comments