Use relative docify paths (#14672)

* Use relative docify paths

Bumping the docify version and using relative paths is needed for
the monorepo to find the test files in the new workspace.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update docify to fix paths issue

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Sam Johnson <sam@durosoft.com>
This commit is contained in:
Oliver Tale-Yazdi
2023-08-05 09:30:07 +02:00
committed by GitHub
parent ef0238dd29
commit 32bd1c397b
4 changed files with 15 additions and 40 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ frame-election-provider-support = { default-features = false, path = "../electio
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" }
docify = "0.2.0"
docify = "0.2.1"
[dev-dependencies]
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../staking/reward-curve" }
+1 -1
View File
@@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive"] }
docify = "0.1.13"
docify = "0.2.1"
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" }
+5 -5
View File
@@ -39,18 +39,18 @@
//! ## Examples
//!
//! 1. **Appending** some data to the list can happen either by [`Pallet::append_one`]:
#![doc = docify::embed!("frame/paged-list/src/tests.rs", append_one_works)]
#![doc = docify::embed!("src/tests.rs", append_one_works)]
//! 2. or by [`Pallet::append_many`]. This should always be preferred to repeated calls to
//! [`Pallet::append_one`]:
#![doc = docify::embed!("frame/paged-list/src/tests.rs", append_many_works)]
#![doc = docify::embed!("src/tests.rs", append_many_works)]
//! 3. If you want to append many values (ie. in a loop), then best use the [`Pallet::appender`]:
#![doc = docify::embed!("frame/paged-list/src/tests.rs", appender_works)]
#![doc = docify::embed!("src/tests.rs", appender_works)]
//! 4. **Iterating** over the list can be done with [`Pallet::iter`]. It uses the standard
//! `Iterator` trait:
#![doc = docify::embed!("frame/paged-list/src/tests.rs", iter_works)]
#![doc = docify::embed!("src/tests.rs", iter_works)]
//! 5. **Draining** elements happens through the [`Pallet::drain`] iterator. Note that even
//! *peeking* a value will already remove it.
#![doc = docify::embed!("frame/paged-list/src/tests.rs", drain_works)]
#![doc = docify::embed!("src/tests.rs", drain_works)]
//!
//! ## Pallet API
//!