Skip to content

Commit 167548f

Browse files
committed
Fix doc build and add github test for it.
1 parent ebce463 commit 167548f

File tree

12 files changed

+52
-40
lines changed

12 files changed

+52
-40
lines changed

.github/workflows/doc.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Docs
2+
on: [push, pull_request]
3+
jobs:
4+
all:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: hecrj/setup-rust-action@v1
8+
with:
9+
components: clippy
10+
- uses: actions/checkout@master
11+
- name: Check Docs
12+
run: cargo doc --workspace

examples/pong/src/layer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct Layer<'a, Message, Renderer> {
1818
}
1919

2020
impl<'a, Message, Renderer> Layer<'a, Message, Renderer> {
21-
/// Returns a new [`Modal`]
21+
/// Returns a new [`Layer`]
2222
pub fn new(
2323
base: impl Into<Element<'a, Message, Renderer>>,
2424
layer: impl Into<Element<'a, Message, Renderer>>,

src/keyframes/button.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ impl Id {
2121
Self(widget::Id::unique())
2222
}
2323

24-
/// Used by [`chain!`] macro
24+
/// Used by [`crate::chain!`] macro
2525
pub fn into_chain(self) -> Chain {
2626
Chain::new(self)
2727
}
2828

29-
/// Used by [`chain!`] macro
29+
/// Used by [`crate::chain!`] macro
3030
pub fn into_chain_with_children(self, children: Vec<Button>) -> Chain {
3131
Chain::with_children(self, children)
3232
}
3333

34-
/// Used by [`anim!`] macro
34+
/// Used by [`crate::anim!`] macro
3535
pub fn as_widget<'a, Message, Renderer>(
3636
self,
3737
timeline: &crate::Timeline,

src/keyframes/column.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ impl Id {
2121
Self(widget::Id::unique())
2222
}
2323

24-
/// Used by [`chain!`] macro
24+
/// Used by [`crate::chain!`] macro
2525
pub fn into_chain(self) -> Chain {
2626
Chain::new(self)
2727
}
2828

29-
/// Used by [`chain!`] macro
29+
/// Used by [`crate::chain!`] macro
3030
pub fn into_chain_with_children(self, children: Vec<Column>) -> Chain {
3131
Chain::with_children(self, children)
3232
}
3333

34-
/// Used by [`anim!`] macro
34+
/// Used by [`crate::anim!`] macro
3535
pub fn as_widget<'a, Message, Renderer>(
3636
self,
3737
timeline: &crate::Timeline,

src/keyframes/container.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ impl Id {
2121
Self(widget::Id::unique())
2222
}
2323

24-
/// Used by [`chain!`] macro
24+
/// Used by [`crate::chain!`] macro
2525
pub fn into_chain(self) -> Chain {
2626
Chain::new(self)
2727
}
2828

29-
/// Used by [`chain!`] macro
29+
/// Used by [`crate::chain!`] macro
3030
pub fn into_chain_with_children(self, children: Vec<Container>) -> Chain {
3131
Chain::with_children(self, children)
3232
}
3333

34-
/// Used by [`anim!`] macro
34+
/// Used by [`crate::anim!`] macro
3535
pub fn as_widget<'a, Message, Renderer>(
3636
self,
3737
timeline: &crate::Timeline,

src/keyframes/helpers.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,43 @@ use crate::keyframes::{Button, Column, Container, Row, Space, StyleButton, Style
22
use crate::MovementType;
33

44
/// Create a button keyframe.
5-
/// Needs to be added into a chain. See [`chain!`] macro.
5+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
66
pub fn button(at: impl Into<MovementType>) -> Button {
77
Button::new(at)
88
}
99

1010
/// Create a column keyframe.
11-
/// Needs to be added into a chain. See [`chain!`] macro.
11+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
1212
pub fn column(at: impl Into<MovementType>) -> Column {
1313
Column::new(at)
1414
}
1515

1616
/// Create a container keyframe.
17-
/// Needs to be added into a chain. See [`chain!`] macro.
17+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
1818
pub fn container(at: impl Into<MovementType>) -> Container {
1919
Container::new(at)
2020
}
2121

2222
/// Create a row keyframe.
23-
/// Needs to be added into a chain. See [`chain!`] macro.
23+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
2424
pub fn row(at: impl Into<MovementType>) -> Row {
2525
Row::new(at)
2626
}
2727

2828
/// Create a space keyframe.
29-
/// Needs to be added into a chain. See [`chain!`] macro.
29+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
3030
pub fn space(at: impl Into<MovementType>) -> Space {
3131
Space::new(at)
3232
}
3333

3434
/// Create a style_button keyframe.
35-
/// Needs to be added into a chain. See [`chain!`] macro.
35+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
3636
pub fn style_button(at: impl Into<MovementType>) -> StyleButton {
3737
StyleButton::new(at)
3838
}
3939

4040
/// Create a style_container keyframe.
41-
/// Needs to be added into a chain. See [`chain!`] macro.
41+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
4242
pub fn style_container(at: impl Into<MovementType>) -> StyleContainer {
4343
StyleContainer::new(at)
4444
}
@@ -49,43 +49,43 @@ pub mod lazy {
4949
use crate::MovementType;
5050

5151
/// Create a lazy button keyframe.
52-
/// Needs to be added into a chain. See [`chain!`] macro.
52+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
5353
pub fn button(at: impl Into<MovementType>) -> Button {
5454
Button::lazy(at)
5555
}
5656

5757
/// Create a lazy column keyframe.
58-
/// Needs to be added into a chain. See [`chain!`] macro.
58+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
5959
pub fn column(at: impl Into<MovementType>) -> Column {
6060
Column::lazy(at)
6161
}
6262

6363
/// Create a lazy container keyframe.
64-
/// Needs to be added into a chain. See [`chain!`] macro.
64+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
6565
pub fn container(at: impl Into<MovementType>) -> Container {
6666
Container::lazy(at)
6767
}
6868

6969
/// Create a lazy row keyframe.
70-
/// Needs to be added into a chain. See [`chain!`] macro.
70+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
7171
pub fn row(at: impl Into<MovementType>) -> Row {
7272
Row::lazy(at)
7373
}
7474

7575
/// Create a lazy space keyframe.
76-
/// Needs to be added into a chain. See [`chain!`] macro.
76+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
7777
pub fn space(at: impl Into<MovementType>) -> Space {
7878
Space::lazy(at)
7979
}
8080

8181
/// Create a lazy style_button keyframe.
82-
/// Needs to be added into a chain. See [`chain!`] macro.
82+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
8383
pub fn style_button(at: impl Into<MovementType>) -> StyleButton {
8484
StyleButton::lazy(at)
8585
}
8686

8787
/// Create a lazy style_container keyframe.
88-
/// Needs to be added into a chain. See [`chain!`] macro.
88+
/// Needs to be added into a chain. See [`crate::chain!`] macro.
8989
pub fn style_container(at: impl Into<MovementType>) -> StyleContainer {
9090
StyleContainer::lazy(at)
9191
}

src/keyframes/row.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ impl Id {
2121
Self(widget::Id::unique())
2222
}
2323

24-
/// Used by [`chain!`] macro
24+
/// Used by [`crate::chain!`] macro
2525
pub fn into_chain(self) -> Chain {
2626
Chain::new(self)
2727
}
2828

29-
/// Used by [`chain!`] macro
29+
/// Used by [`crate::chain!`] macro
3030
pub fn into_chain_with_children(self, children: Vec<Row>) -> Chain {
3131
Chain::with_children(self, children)
3232
}
3333

34-
/// Used by [`anim!`] macro
34+
/// Used by [`crate::anim!`] macro
3535
pub fn as_widget<'a, Message, Renderer>(
3636
self,
3737
timeline: &crate::Timeline,

src/keyframes/space.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ impl Id {
2121
Self(widget::Id::unique())
2222
}
2323

24-
/// Used by [`chain!`] macro
24+
/// Used by [`crate::chain!`] macro
2525
pub fn into_chain(self) -> Chain {
2626
Chain::new(self)
2727
}
2828

29-
/// Used by [`chain!`] macro
29+
/// Used by [`crate::chain!`] macro
3030
pub fn into_chain_with_children(self, children: Vec<Space>) -> Chain {
3131
Chain::with_children(self, children)
3232
}
3333

34-
/// Used by [`anim!`] macro
34+
/// Used by [`crate::anim!`] macro
3535
pub fn as_widget(self, timeline: &crate::Timeline) -> widget::Space {
3636
Space::as_widget(self, timeline)
3737
}

src/keyframes/style_button.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ impl Id {
2222
Self(widget::Id::unique())
2323
}
2424

25-
/// Used by [`chain!`] macro
25+
/// Used by [`crate::chain!`] macro
2626
pub fn into_chain(self) -> Chain {
2727
Chain::new(self)
2828
}
2929

30-
/// Used by [`chain!`] macro
30+
/// Used by [`crate::chain!`] macro
3131
pub fn into_chain_with_children(self, children: Vec<StyleButton>) -> Chain {
3232
Chain::with_children(self, children)
3333
}
3434

35-
/// Used by [`anim!`] macro
35+
/// Used by [`crate::anim!`] macro
3636
pub fn as_widget<'a, Message, Renderer>(
3737
self,
3838
style: fn(u8) -> <Renderer::Theme as StyleSheet>::Style,

src/keyframes/style_container.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ impl Id {
2222
Self(widget::Id::unique())
2323
}
2424

25-
/// Used by [`chain!`] macro
25+
/// Used by [`crate::chain!`] macro
2626
pub fn into_chain(self) -> Chain {
2727
Chain::new(self)
2828
}
2929

30-
/// Used by [`chain!`] macro
30+
/// Used by [`crate::chain!`] macro
3131
pub fn into_chain_with_children(self, children: Vec<StyleContainer>) -> Chain {
3232
Chain::with_children(self, children)
3333
}
3434

35-
/// Used by [`anim!`] macro
35+
/// Used by [`crate::anim!`] macro
3636
pub fn as_widget<'a, Message, Renderer>(
3737
self,
3838
style: fn(u8) -> <Renderer::Theme as StyleSheet>::Style,

0 commit comments

Comments
 (0)