@@ -76,7 +76,7 @@ fn index() -> Template {
76
76
77
77
let context = Context {
78
78
page : page. clone ( ) ,
79
- title : title ,
79
+ title,
80
80
parent : "layout" . to_string ( ) ,
81
81
is_landing : true ,
82
82
rust_version : rust_version:: rust_version ( )
@@ -96,7 +96,7 @@ fn category(category: Category) -> Template {
96
96
let title = format ! ( "Rust - {}" , page) . to_string ( ) ;
97
97
let context = Context {
98
98
page : category. name ( ) . to_string ( ) ,
99
- title : title ,
99
+ title,
100
100
parent : "layout" . to_string ( ) ,
101
101
is_landing : false ,
102
102
} ;
@@ -109,7 +109,7 @@ fn governance() -> Template {
109
109
let title = format ! ( "Rust - {}" , page) . to_string ( ) ;
110
110
let context = GroupContext {
111
111
page : page. clone ( ) ,
112
- title : title ,
112
+ title,
113
113
parent : "layout" . to_string ( ) ,
114
114
is_landing : false ,
115
115
data : load_governance_data ( ) ,
@@ -137,7 +137,7 @@ fn team(t: String, subject: String) -> Template {
137
137
let t = get_type_from_string ( & t) . expect ( "couldnt figure out group type from path string" ) ;
138
138
let context = GroupContext {
139
139
page : page. clone ( ) ,
140
- title : title ,
140
+ title,
141
141
parent : "layout" . to_string ( ) ,
142
142
is_landing : false ,
143
143
data : load_group_data ( t, & subject) ,
@@ -163,12 +163,12 @@ fn load_group_data(t: GroupType, group: &str) -> HashMap<String, Vec<Group>> {
163
163
) ;
164
164
let subteams =
165
165
group:: get_subs_data ( & t, group, & GroupType :: Team ) . expect ( "couldn't get subteams data" ) ;
166
- if subteams. len ( ) > 0 {
166
+ if ! subteams. is_empty ( ) {
167
167
map. insert ( "subteams" . to_string ( ) , subteams) ;
168
168
}
169
169
let subwgs = group:: get_subs_data ( & t, group, & GroupType :: WorkingGroup )
170
170
. expect ( "couldn't get subwgs data" ) ;
171
- if subwgs. len ( ) > 0 {
171
+ if ! subwgs. is_empty ( ) {
172
172
map. insert ( "subwgs" . to_string ( ) , subwgs) ;
173
173
}
174
174
map
@@ -180,7 +180,7 @@ fn production() -> Template {
180
180
let title = format ! ( "Rust - {}" , page) . to_string ( ) ;
181
181
let context = UsersContext {
182
182
page : page. clone ( ) ,
183
- title : title ,
183
+ title,
184
184
parent : "layout" . to_string ( ) ,
185
185
is_landing : false ,
186
186
data : load_users_data ( ) ,
@@ -201,7 +201,7 @@ fn subject(category: Category, subject: String) -> Template {
201
201
let title = format ! ( "Rust - {}" , page) . to_string ( ) ;
202
202
let context = Context {
203
203
page : subject,
204
- title : title ,
204
+ title,
205
205
parent : "layout" . to_string ( ) ,
206
206
is_landing : false ,
207
207
} ;
@@ -214,7 +214,7 @@ fn not_found() -> Template {
214
214
let title = format ! ( "Rust - {}" , page) . to_string ( ) ;
215
215
let context = Context {
216
216
page : "404" . to_string ( ) ,
217
- title : title ,
217
+ title,
218
218
parent : "layout" . to_string ( ) ,
219
219
is_landing : false ,
220
220
} ;
@@ -241,6 +241,7 @@ fn main() {
241
241
. mount (
242
242
"/" ,
243
243
routes ! [ index, category, governance, team, production, subject, files] ,
244
- ) . catch ( catchers ! [ not_found, catch_error] )
244
+ )
245
+ . catch ( catchers ! [ not_found, catch_error] )
245
246
. launch ( ) ;
246
247
}
0 commit comments