Skip to content

Commit 0a3297d

Browse files
sypharJoshua Nelson
authored and
Joshua Nelson
committed
use char range where possible
1 parent 3da597a commit 0a3297d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/web/sitemap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl_webpage! {
2121
}
2222

2323
pub fn sitemapindex_handler(req: &mut Request) -> IronResult<Response> {
24-
let sitemaps: Vec<char> = (b'a'..=b'z').map(char::from).collect();
24+
let sitemaps: Vec<char> = ('a'..='z').collect();
2525

2626
SitemapIndexXml { sitemaps }.into_response(req)
2727
}
@@ -216,7 +216,7 @@ mod tests {
216216
assert!(!(content.contains(&"some_random_crate_that_failed")));
217217

218218
// and not in the others
219-
for letter in ('a'..='z').filter(|&&c| c != 's') {
219+
for letter in ('a'..='z').filter(|&c| c != 's') {
220220
let response = web
221221
.get(&format!("/-/sitemap/{}/sitemap.xml", letter))
222222
.send()?;

0 commit comments

Comments
 (0)