@@ -21,7 +21,6 @@ const SKIP_LABELS: &[&str] = &[
21
21
#[ derive( Clone , Template ) ]
22
22
#[ template( path = "relnotes.md" , escape = "none" ) ]
23
23
struct ReleaseNotes {
24
- cargo_links : String ,
25
24
cargo_relnotes : String ,
26
25
cargo_unsorted : String ,
27
26
compat_relnotes : String ,
@@ -33,7 +32,6 @@ struct ReleaseNotes {
33
32
language_unsorted : String ,
34
33
libraries_relnotes : String ,
35
34
libraries_unsorted : String ,
36
- links : String ,
37
35
unsorted : String ,
38
36
unsorted_relnotes : String ,
39
37
version : String ,
@@ -71,7 +69,6 @@ fn main() {
71
69
72
70
let relnotes_tags = & [ "relnotes" , "finished-final-comment-period" , "needs-fcp" ] ;
73
71
74
- let links = map_to_link_items ( "" , in_release. clone ( ) ) ;
75
72
let ( relnotes, rest) = partition_by_tag ( in_release, relnotes_tags) ;
76
73
77
74
let (
@@ -91,14 +88,9 @@ fn main() {
91
88
let ( cargo_relnotes, cargo_unsorted) = {
92
89
let ( relnotes, rest) = partition_by_tag ( cargo_issues. iter ( ) , relnotes_tags) ;
93
90
94
- (
95
- map_to_line_items ( "cargo/" , relnotes) ,
96
- map_to_line_items ( "cargo/" , rest) ,
97
- )
91
+ ( map_to_line_items ( relnotes) , map_to_line_items ( rest) )
98
92
} ;
99
93
100
- let cargo_links = map_to_link_items ( "cargo/" , cargo_issues. iter ( ) ) ;
101
-
102
94
let relnotes = ReleaseNotes {
103
95
version,
104
96
date : ( end + six_weeks) . naive_utc ( ) ,
@@ -114,8 +106,6 @@ fn main() {
114
106
cargo_unsorted,
115
107
unsorted_relnotes,
116
108
unsorted,
117
- links,
118
- cargo_links,
119
109
} ;
120
110
121
111
println ! ( "{}" , relnotes. render( ) . unwrap( ) ) ;
@@ -217,34 +207,13 @@ fn request_header() -> HeaderMap {
217
207
headers
218
208
}
219
209
220
- fn map_to_line_items < ' a > (
221
- prefix : & ' static str ,
222
- iter : impl IntoIterator < Item = & ' a json:: Value > ,
223
- ) -> String {
210
+ fn map_to_line_items < ' a > ( iter : impl IntoIterator < Item = & ' a json:: Value > ) -> String {
224
211
iter. into_iter ( )
225
212
. map ( |o| {
226
213
format ! (
227
- "- [{title}][{prefix}{number}]" ,
228
- prefix = prefix,
214
+ "- [{title}]({url}/)" ,
229
215
title = o[ "title" ] . as_str( ) . unwrap( ) ,
230
- number = o[ "number" ] ,
231
- )
232
- } )
233
- . collect :: < Vec < _ > > ( )
234
- . join ( "\n " )
235
- }
236
-
237
- fn map_to_link_items < ' a > (
238
- prefix : & ' static str ,
239
- iter : impl IntoIterator < Item = & ' a json:: Value > ,
240
- ) -> String {
241
- iter. into_iter ( )
242
- . map ( |o| {
243
- format ! (
244
- "[{prefix}{number}]: {url}/" ,
245
- prefix = prefix,
246
- number = o[ "number" ] ,
247
- url = o[ "url" ] . as_str( ) . unwrap( )
216
+ url = o[ "url" ] . as_str( ) . unwrap( ) ,
248
217
)
249
218
} )
250
219
. collect :: < Vec < _ > > ( )
@@ -273,10 +242,10 @@ fn partition_prs<'a>(
273
242
let ( compiler, rest) = partition_by_tag ( rest, & [ "T-compiler" ] ) ;
274
243
275
244
(
276
- map_to_line_items ( "" , compat_notes) ,
277
- map_to_line_items ( "" , libs) ,
278
- map_to_line_items ( "" , lang) ,
279
- map_to_line_items ( "" , compiler) ,
280
- map_to_line_items ( "" , rest) ,
245
+ map_to_line_items ( compat_notes) ,
246
+ map_to_line_items ( libs) ,
247
+ map_to_line_items ( lang) ,
248
+ map_to_line_items ( compiler) ,
249
+ map_to_line_items ( rest) ,
281
250
)
282
251
}
0 commit comments