Skip to content

Commit d55ce18

Browse files
tall-vasegribozavr
andauthored
Make some comments doc comments
Co-authored-by: Dmitri Gribenko <[email protected]>
1 parent 26cfe2b commit d55ce18

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ The borrow checker, while added to enforce memory ownership, can be
88
leveraged model other problems and prevent API misuse.
99

1010
```rust,editable
11-
// Doors can be open or closed, and you need the right key to lock or unlock
12-
// one. Modelled with a Shared key and Owned door.
11+
/// Doors can be open or closed, and you need the right key to lock or unlock
12+
/// one. Modelled with a Shared key and Owned door.
1313
pub struct DoorKey {
1414
pub key_shape: u32,
1515
}

src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ example of this is in cryptography: "Nonces."
99

1010
```rust,editable
1111
pub struct Key(/* specifics omitted */);
12-
// A single-use number suitable for cryptographic purposes.
12+
/// A single-use number suitable for cryptographic purposes.
1313
pub struct Nonce(u32);
14-
// A cryptographically sound random generator function.
14+
/// A cryptographically sound random generator function.
1515
pub fn new_nonce() -> Nonce {
1616
Nonce(4) // chosen by a fair dice roll, https://xkcd.com/221/
1717
}
18-
// Consume a nonce, but not the key or the data.
18+
/// Consume a nonce, but not the key or the data.
1919
pub fn encrypt(nonce: Nonce, key: &Key, data: &[u8]) {}
2020
2121
fn main() {

0 commit comments

Comments
 (0)