From 6ff6d8e5e10a366deb61a5a1772909fbe7c2e3e2 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Fri, 27 May 2022 14:31:54 -0700 Subject: [PATCH 1/3] add safety comments section to top level summary --- src/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index c48ccf8..16d15ba 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -42,6 +42,7 @@ - [Documentation](./documentation/summary.md) - [doc alias policy](./documentation/doc-alias-policy.md) + - [safety comments policy](./documentation/safety-comments.md) --- From 08525e0b7426719e415cce44c6bd2cb3f16c1582 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Fri, 27 May 2022 14:35:48 -0700 Subject: [PATCH 2/3] ignore examples that don't compile without impl blocks --- src/documentation/safety-comments.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documentation/safety-comments.md b/src/documentation/safety-comments.md index 5cbe19d..f47544d 100644 --- a/src/documentation/safety-comments.md +++ b/src/documentation/safety-comments.md @@ -17,7 +17,7 @@ lint for `# Safety` sections by the way. [See the example on github][as_bytes_mut] -```rust +```rust,ignore /// Converts a mutable string slice to a mutable byte slice. /// /// # Safety @@ -64,7 +64,7 @@ not check for `0` before dividing. [See the example on github][split_at] -```rust +```rust,ignore pub fn split_at(&self, mid: usize) -> (&str, &str) { // is_char_boundary checks that the index is in [0, .len()] if self.is_char_boundary(mid) { From 7642673d5b43845a7aedfdc951a655de899dd945 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Fri, 27 May 2022 14:36:58 -0700 Subject: [PATCH 3/3] bump mdbook version to silence warning in CI --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index aba142f..84f2d46 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -MDBOOK_VERSION=0.4.8 +MDBOOK_VERSION=0.4.18 MDBOOK_LINKCHECK_VERSION=0.7.4 MDBOOK_TOC_VERSION=0.6.3