Skip to content

Commit

Permalink
Fix utils crate and history docs. (#189)
Browse files Browse the repository at this point in the history
* Fix `utils` crate and `history` docs.

* Fix another intra-doc link
  • Loading branch information
richard-uk1 authored Feb 13, 2022
1 parent 8af93e3 commit 2aa1f6f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion crates/console/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ macro_rules! info {
/// Calls `console.table()`
///
/// Since in most cases, this takes in an object, instead of, say a string literal/variable,
/// we use [`serde`](https://serde.rs) to serialize the passed data object into [`JsValue`].
/// we use [`serde`](https://serde.rs) to serialize the passed data object into
/// [`JsValue`][wasm_bindgen::JsValue].
///
/// An `IntoIterator<Item = &str>` can be passed to specify the columns.
#[macro_export]
Expand Down
6 changes: 3 additions & 3 deletions crates/history/src/listener.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::fmt;
use std::rc::Rc;

/// A History Listener to manage callbacks registered on a [`History`].
/// A History Listener to manage callbacks registered on a [`History`][crate::History].
///
/// This Listener has the same behaviour as the [`EventListener`] from [`gloo`]
/// that the underlying callback will be unregistered when the listener is dropped.
/// This Listener has the same behaviour as the [`EventListener`][gloo_events::EventListener] from
/// `gloo` that the underlying callback will be unregistered when the listener is dropped.
#[must_use = "the listener is removed when `HistoryListener` is dropped"]
pub struct HistoryListener {
pub(crate) _listener: Rc<dyn Fn()>,
Expand Down
3 changes: 2 additions & 1 deletion crates/history/src/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use crate::error::HistoryResult;

/// A history location.
///
/// This struct provides location information at the time [`History::location`] is called.
/// This struct provides location information at the time
/// [`History::location`][crate::History::location] is called.
#[derive(Clone, Debug)]
pub struct Location {
pub(crate) path: Rc<String>,
Expand Down
3 changes: 2 additions & 1 deletion crates/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ features = [
"HtmlElement",
"Location",
"Window",
"HtmlHeadElement"
"HtmlHeadElement",
"Element",
]

0 comments on commit 2aa1f6f

Please sign in to comment.