Skip to content

Commit e3aa8f7

Browse files
authored
Merge pull request #2077 from matze/fix-doc-links
Fix majority of unresolved documentation links
2 parents 89d9c45 + 419d937 commit e3aa8f7

58 files changed

Lines changed: 193 additions & 181 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/document.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Document
2-
on:
3-
push:
4-
branches:
5-
- master
2+
on: [push, pull_request]
63
jobs:
74
all:
85
runs-on: ubuntu-20.04
@@ -31,6 +28,7 @@ jobs:
3128
- name: Write CNAME file
3229
run: echo 'docs.iced.rs' > ./target/doc/CNAME
3330
- name: Publish documentation
31+
if: github.ref == 'refs/heads/master'
3432
uses: peaceiris/actions-gh-pages@v3
3533
with:
3634
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}

core/src/angle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl num_traits::FromPrimitive for Radians {
5555
}
5656

5757
impl Radians {
58-
/// Calculates the line in which the [`Angle`] intercepts the `bounds`.
58+
/// Calculates the line in which the angle intercepts the `bounds`.
5959
pub fn to_distance(&self, bounds: &Rectangle) -> (Point, Point) {
6060
let angle = self.0 - FRAC_PI_2;
6161
let r = Vector::new(f32::cos(angle), f32::sin(angle));

core/src/gradient.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ use std::cmp::Ordering;
66
#[derive(Debug, Clone, Copy, PartialEq)]
77
/// A fill which transitions colors progressively along a direction, either linearly, radially (TBD),
88
/// or conically (TBD).
9-
///
10-
/// For a gradient which can be used as a fill on a canvas, see [`iced_graphics::Gradient`].
119
pub enum Gradient {
12-
/// A linear gradient interpolates colors along a direction at a specific [`Angle`].
10+
/// A linear gradient interpolates colors along a direction at a specific angle.
1311
Linear(Linear),
1412
}
1513

core/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#![doc(
1010
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
1111
)]
12+
#![forbid(unsafe_code, rust_2018_idioms)]
1213
#![deny(
1314
missing_debug_implementations,
1415
missing_docs,
@@ -17,9 +18,9 @@
1718
clippy::from_over_into,
1819
clippy::needless_borrow,
1920
clippy::new_without_default,
20-
clippy::useless_conversion
21+
clippy::useless_conversion,
22+
rustdoc::broken_intra_doc_links
2123
)]
22-
#![forbid(unsafe_code, rust_2018_idioms)]
2324
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
2425
pub mod alignment;
2526
pub mod clipboard;

core/src/shell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl<'a, Message> Shell<'a, Message> {
3535
self.messages.push(message);
3636
}
3737

38-
/// Requests a new frame to be drawn at the given [`Instant`].
38+
/// Requests a new frame to be drawn.
3939
pub fn request_redraw(&mut self, request: window::RedrawRequest) {
4040
match self.redraw_request {
4141
None => {
@@ -48,7 +48,7 @@ impl<'a, Message> Shell<'a, Message> {
4848
}
4949
}
5050

51-
/// Returns the requested [`Instant`] a redraw should happen, if any.
51+
/// Returns the request a redraw should happen, if any.
5252
pub fn redraw_request(&self) -> Option<window::RedrawRequest> {
5353
self.redraw_request
5454
}

core/src/window/icon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Icon {
4949
}
5050

5151
#[derive(Debug, thiserror::Error)]
52-
/// An error produced when using [`Icon::from_rgba`] with invalid arguments.
52+
/// An error produced when using [`from_rgba`] with invalid arguments.
5353
pub enum Error {
5454
/// Produced when the length of the `rgba` argument isn't divisible by 4, thus `rgba` can't be
5555
/// safely interpreted as 32bpp RGBA pixels.

futures/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![doc(
55
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
66
)]
7+
#![forbid(unsafe_code, rust_2018_idioms)]
78
#![deny(
89
missing_debug_implementations,
910
missing_docs,
@@ -12,9 +13,9 @@
1213
clippy::from_over_into,
1314
clippy::needless_borrow,
1415
clippy::new_without_default,
15-
clippy::useless_conversion
16+
clippy::useless_conversion,
17+
rustdoc::broken_intra_doc_links
1618
)]
17-
#![forbid(unsafe_code, rust_2018_idioms)]
1819
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
1920
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2021
pub use futures;

futures/src/runtime.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use std::marker::PhantomData;
99
/// A batteries-included runtime of commands and subscriptions.
1010
///
1111
/// If you have an [`Executor`], a [`Runtime`] can be leveraged to run any
12-
/// [`Command`] or [`Subscription`] and get notified of the results!
12+
/// `Command` or [`Subscription`] and get notified of the results!
1313
///
14-
/// [`Command`]: crate::Command
14+
/// [`Subscription`]: crate::Subscription
1515
#[derive(Debug)]
1616
pub struct Runtime<Executor, Sender, Message> {
1717
executor: Executor,
@@ -75,6 +75,7 @@ where
7575
/// [`Tracker::update`] to learn more about this!
7676
///
7777
/// [`Tracker::update`]: subscription::Tracker::update
78+
/// [`Subscription`]: crate::Subscription
7879
pub fn track(
7980
&mut self,
8081
recipes: impl IntoIterator<

futures/src/subscription.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ pub type EventStream = BoxStream<(Event, event::Status)>;
1919

2020
/// A request to listen to external events.
2121
///
22-
/// Besides performing async actions on demand with [`Command`], most
22+
/// Besides performing async actions on demand with `Command`, most
2323
/// applications also need to listen to external events passively.
2424
///
25-
/// A [`Subscription`] is normally provided to some runtime, like a [`Command`],
25+
/// A [`Subscription`] is normally provided to some runtime, like a `Command`,
2626
/// and it will generate events as long as the user keeps requesting it.
2727
///
2828
/// For instance, you can use a [`Subscription`] to listen to a WebSocket
2929
/// connection, keyboard presses, mouse events, time ticks, etc.
30-
///
31-
/// [`Command`]: crate::Command
3230
#[must_use = "`Subscription` must be returned to runtime to take effect"]
3331
pub struct Subscription<Message> {
3432
recipes: Vec<Box<dyn Recipe<Output = Message>>>,

futures/src/subscription/tracker.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ use std::hash::Hasher as _;
1414
/// If you have an application that continuously returns a [`Subscription`],
1515
/// you can use a [`Tracker`] to keep track of the different recipes and keep
1616
/// its executions alive.
17+
///
18+
/// [`Subscription`]: crate::Subscription
1719
#[derive(Debug, Default)]
1820
pub struct Tracker {
1921
subscriptions: HashMap<u64, Execution>,
@@ -51,6 +53,7 @@ impl Tracker {
5153
/// the [`Tracker`] changes.
5254
///
5355
/// [`Recipe`]: crate::subscription::Recipe
56+
/// [`Subscription`]: crate::Subscription
5457
pub fn update<Message, Receiver>(
5558
&mut self,
5659
recipes: impl Iterator<Item = Box<dyn Recipe<Output = Message>>>,

0 commit comments

Comments
 (0)