From 49732f65339f4c120afb49e9edb72eda8d17b737 Mon Sep 17 00:00:00 2001 From: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:30:36 +0200 Subject: [PATCH] feat: fix formatting block (#5630) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description --- Fixed the formatting block in `base_layer/mmr/src/sparse_merkle_tree/mod.rs` This caused a formatting warp, but sufficiently excluded the text from doc tests: ``` //! . ┌──────┐ ``` This fixed the formatting warp, but added the text to the doc test, which failed: ``` //! ┌──────┐ ``` Test error: ``` as ---- src\sparse_merkle_tree\mod.rs - sparse_merkle_tree (line 28) stdout ---- error: unknown start of token: \u{250c} --> src\sparse_merkle_tree\mod.rs:29:1 | 3 | ┌──────┐ | ^ ``` This fixed both issues: ``` //! r###" ┌──────┐ "### ``` Motivation and Context --- See above How Has This Been Tested? --- Ran `rust update`, then `cargo +nightly fmt --all` and then `cargo test --release` What process can a PR reviewer use to test or verify this change? --- Run `rust update`, then `cargo +nightly fmt --all` and then `cargo test --release` Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify --- base_layer/mmr/src/sparse_merkle_tree/mod.rs | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/base_layer/mmr/src/sparse_merkle_tree/mod.rs b/base_layer/mmr/src/sparse_merkle_tree/mod.rs index 5b168f6dd9..cefad3af9b 100644 --- a/base_layer/mmr/src/sparse_merkle_tree/mod.rs +++ b/base_layer/mmr/src/sparse_merkle_tree/mod.rs @@ -25,21 +25,21 @@ //! you will notice that they the first two diverge at the first bit, while the first and last pairs differ at the //! fourth bit. This results in a SMT that looks like this: //! -//! ┌──────┐ -//! ┌─────┤ root ├─────┐ -//! │ └──────┘ │ -//! ┌┴┐ ┌┴┐1 -//! ┌──┤ ├──┐ ┌──┤ ├───┐ -//! │ └─┘ │ │ └─┘ │ -//! ┌┴┐ ┌┴┐ ┌┴┐10 ┌┴┐11 -//! │0│ ┌──┤ ├──┐ │0│ ┌─┤ ├─┐ -//! └─┘ │ └─┘ │ └─┘ │ └─┘ │ -//! ┌┴┐ ┌┴┐ 110┌┴┐ ┌┴┐111 -//! ┌─┤ ├─┐ │0│ │0│ ┌─┤ ├─┐ -//! │ └─┘ │ └─┘ └─┘ │ └─┘ │ -//! ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ -//! │A│ │B│ │D│ │C│ -//! └─┘ └─┘ └─┘ └─┘ +//! r###" ┌──────┐ "### +//! r###" ┌─────┤ root ├─────┐ "### +//! r###" │ └──────┘ │ "### +//! r###" ┌┴┐ ┌┴┐1 "### +//! r###" ┌──┤ ├──┐ ┌──┤ ├───┐ "### +//! r###" │ └─┘ │ │ └─┘ │ "### +//! r###" ┌┴┐ ┌┴┐ ┌┴┐10 ┌┴┐11 "### +//! r###" │0│ ┌──┤ ├──┐ │0│ ┌─┤ ├─┐ "### +//! r###" └─┘ │ └─┘ │ └─┘ │ └─┘ │ "### +//! r###" ┌┴┐ ┌┴┐ 110┌┴┐ ┌┴┐111 "### +//! r###" ┌─┤ ├─┐ │0│ │0│ ┌─┤ ├─┐ "### +//! r###" │ └─┘ │ └─┘ └─┘ │ └─┘ │ "### +//! r###" ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ "### +//! r###" │A│ │B│ │D│ │C│ "### +//! r###" └─┘ └─┘ └─┘ └─┘ "### //! //! The merkle root is calculated by hashing nodes in the familiar way. //! ```rust