Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Use relative docify paths (#14672)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ggwpez and sam0x17 authored Aug 5, 2023
1 parent a6b0d43 commit 6800101
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 40 deletions.
41 changes: 8 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frame/fast-unstake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion frame/paged-list/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
10 changes: 5 additions & 5 deletions frame/paged-list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
Expand Down

0 comments on commit 6800101

Please sign in to comment.