Skip to content

Commit 2c71b2a

Browse files
committed
Auto merge of #4248 - Turbo87:doc-tests, r=Turbo87
Cargo: Enable doctests again They were disabled in 2014 for some unknown reason, but these days there is really no reason to have them disabled.
2 parents 35d00bd + 7a20ce8 commit 2c71b2a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ opt-level = 2
1515

1616
[lib]
1717
name = "cargo_registry"
18-
doctest = false
18+
doctest = true
1919

2020
[[test]]
2121
name = "all"

src/controllers/krate/owners.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ pub fn remove_owners(req: &mut dyn RequestExt) -> EndpointResult {
5555
}
5656

5757
/// Parse the JSON request body of requests to modify the owners of a crate.
58-
/// The format is
5958
///
60-
/// {"owners": ["username", "github:org:team", ...]}
59+
/// The format is:
60+
///
61+
/// ```json
62+
/// {"owners": ["username", "github:org:team", ...]}
63+
/// ```
6164
fn parse_owners_request(req: &mut dyn RequestExt) -> AppResult<Vec<String>> {
6265
let mut body = String::new();
6366
req.body().read_to_string(&mut body)?;

0 commit comments

Comments
 (0)