Skip to content

Commit 5a5b39a

Browse files
sgalkinSergey GalkinCopilot
authored
refactor(bytesbuf): rename doc/ directory to docs/ for convention consistency (#522)
`bytesbuf` was the only crate using the singular `doc/` directory, while `multitude` and the wider Rust ecosystem use `docs/`. The singular `doc/` also collides conceptually with rustdoc's generated `target/doc/` output. Co-authored-by: Sergey Galkin <sgalkin@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fbce18a commit 5a5b39a

10 files changed

Lines changed: 10 additions & 10 deletions

File tree

crates/bytesbuf/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
Types for creating and manipulating byte sequences.
1717

18-
<img src="https://media.githubusercontent.com/media/microsoft/oxidizer/refs/heads/main/crates/bytesbuf/doc/diagrams/Introduction.png" alt="Diagram showing byte sequences inside BytesView and BytesBuf" />
18+
<img src="https://media.githubusercontent.com/media/microsoft/oxidizer/refs/heads/main/crates/bytesbuf/docs/diagrams/Introduction.png" alt="Diagram showing byte sequences inside BytesView and BytesBuf" />
1919

2020
Types in this crate enable you to operate on logical sequences of bytes stored in memory,
2121
similar to a `&[u8]` but with some key differences:
@@ -471,7 +471,7 @@ See the `mem::testing` module for details (requires `test-util` Cargo feature).
471471
This crate was developed as part of <a href="../..">The Oxidizer Project</a>. Browse this crate's <a href="https://github.com/microsoft/oxidizer/tree/main/crates/bytesbuf">source code</a>.
472472
</sub>
473473

474-
[__cargo_doc2readme_dependencies_info]: ggGmYW0CYXZlMC43LjJhdIQbLiTyV0MU86EbZU15e0PmecoboQ9jo59bnAEbyDXw04U13GlhYvRhcoQb3Um38gMny5obPDtS9we40N0baM-dMLra_2cbwUZ6yJrd_CNhZIGCaGJ5dGVzYnVmZTAuNS41
474+
[__cargo_doc2readme_dependencies_info]: ggGmYW0CYXZlMC43LjJhdIQbLiTyV0MU86EbZU15e0PmecoboQ9jo59bnAEbyDXw04U13GlhYvRhcoQb4gvD4zw9iycbirtUutkkzqcbSlRn3SgH6bsbjAbxNhZA3wBhZIGCaGJ5dGVzYnVmZTAuNS41
475475
[__link0]: https://docs.rs/bytesbuf/0.5.5/bytesbuf/?search=BytesBuf
476476
[__link1]: https://docs.rs/bytesbuf/0.5.5/bytesbuf/?search=BytesView
477477
[__link10]: https://docs.rs/bytesbuf/0.5.5/bytesbuf/?search=BytesView
File renamed without changes.
File renamed without changes.

crates/bytesbuf/doc/snippets/choosing_memory_provider.md renamed to crates/bytesbuf/docs/snippets/choosing_memory_provider.md

File renamed without changes.

crates/bytesbuf/doc/snippets/sequence_memory_layout.md renamed to crates/bytesbuf/docs/snippets/sequence_memory_layout.md

File renamed without changes.

crates/bytesbuf/src/buf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use crate::{BytesBufWriter, BytesView, MAX_INLINE_SPANS, MemoryGuard, Span, Span
4646
///
4747
/// Existing [`BytesView`]s can be appended to the `BytesBuf` via [`put_bytes()`] without
4848
/// consuming capacity as each appended [`BytesView`] brings its own backing memory capacity.
49-
#[doc = include_str!("../doc/snippets/sequence_memory_layout.md")]
49+
#[doc = include_str!("../docs/snippets/sequence_memory_layout.md")]
5050
///
5151
/// # Example
5252
///
@@ -770,7 +770,7 @@ impl BytesBuf {
770770
/// return the remaining range from the same slice in the next call).
771771
///
772772
/// To write to multiple slices concurrently, use [`begin_vectored_write()`].
773-
#[doc = include_str!("../doc/snippets/sequence_memory_layout.md")]
773+
#[doc = include_str!("../docs/snippets/sequence_memory_layout.md")]
774774
///
775775
/// # Example
776776
///

crates/bytesbuf/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
//! Types for creating and manipulating byte sequences.
88
//!
9-
//! <img src="https://media.githubusercontent.com/media/microsoft/oxidizer/refs/heads/main/crates/bytesbuf/doc/diagrams/Introduction.png" alt="Diagram showing byte sequences inside BytesView and BytesBuf" />
9+
//! <img src="https://media.githubusercontent.com/media/microsoft/oxidizer/refs/heads/main/crates/bytesbuf/docs/diagrams/Introduction.png" alt="Diagram showing byte sequences inside BytesView and BytesBuf" />
1010
//!
1111
//! Types in this crate enable you to operate on logical sequences of bytes stored in memory,
1212
//! similar to a `&[u8]` but with some key differences:

crates/bytesbuf/src/mem/global.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::mem::{Block, BlockRef, BlockRefDynamic, BlockRefVTable, BlockSize, Me
2222
/// refers to the fact that all the memory capacity is obtained from the Rust global memory allocator.
2323
///
2424
/// Clones of this type are equivalent and share the same pool of memory as long as they remain on the same thread.
25-
#[doc = include_str!("../../doc/snippets/choosing_memory_provider.md")]
25+
#[doc = include_str!("../../docs/snippets/choosing_memory_provider.md")]
2626
///
2727
/// # Multithreaded use
2828
///

crates/bytesbuf/src/mem/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::BytesBuf;
99
///
1010
/// Call [`reserve()`][Self::reserve] to reserve memory capacity and obtain a [`BytesBuf`]
1111
/// that can be used to fill the reserved memory with data.
12-
#[doc = include_str!("../../doc/snippets/choosing_memory_provider.md")]
12+
#[doc = include_str!("../../docs/snippets/choosing_memory_provider.md")]
1313
///
1414
/// # Resource management
1515
///

crates/bytesbuf/src/view.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::{MAX_INLINE_SPANS, MemoryGuard, Span};
2828
/// * Copy data from a `&[u8]` using [`copied_from_slice()`].
2929
///
3030
/// Some of these methods may require you to first [obtain access to a memory provider].
31-
#[doc = include_str!("../doc/snippets/sequence_memory_layout.md")]
31+
#[doc = include_str!("../docs/snippets/sequence_memory_layout.md")]
3232
///
3333
/// # Example
3434
///
@@ -502,7 +502,7 @@ impl BytesView {
502502
/// References the first slice of bytes in the byte sequence.
503503
///
504504
/// Returns an empty slice if the view is over a zero-sized byte sequence.
505-
#[doc = include_str!("../doc/snippets/sequence_memory_layout.md")]
505+
#[doc = include_str!("../docs/snippets/sequence_memory_layout.md")]
506506
///
507507
/// # Example
508508
///
@@ -536,7 +536,7 @@ impl BytesView {
536536
///
537537
/// Each item is a tuple of `(data, meta)` where `data` is a byte slice and `meta` is the
538538
/// optional metadata of the memory block backing that slice.
539-
#[doc = include_str!("../doc/snippets/sequence_memory_layout.md")]
539+
#[doc = include_str!("../docs/snippets/sequence_memory_layout.md")]
540540
///
541541
/// # Example
542542
///

0 commit comments

Comments
 (0)