Skip to content

Commit 3c2cad5

Browse files
jshasyphar
authored andcommitted
Use Some([header])
1 parent 43c6933 commit 3c2cad5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/web/rustdoc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,9 @@ impl RustdocPage {
332332
result => result.context("error rewriting HTML")?,
333333
};
334334

335-
let robots = if is_latest_url { "" } else { "noindex" };
336335
Ok((
337336
StatusCode::OK,
338-
[("X-Robots-Tag", robots)],
337+
(!is_latest_url).then_some([("X-Robots-Tag", "noindex")]),
339338
Extension(if is_latest_url {
340339
CachePolicy::ForeverInCdn
341340
} else {

0 commit comments

Comments
 (0)