Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Documentation #23

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/views/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ where
}
}

/// Canvas for GPU drawing with Vger. See https://github.com/audulus/vger-rs.
/// Canvas for GPU drawing with Vger. See <https://github.com/audulus/vger-rs>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does that warning come from?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I ran cargo doc, it threw a warning (https://doc.rust-lang.org/rustdoc/lints.html#bare_urls). Essentially, as it was it wouldn't actually render into a hyperlink, just a URL text. Adding <> should make it a hyperlink.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just compared the version on docs.rs and my local docs build, and adding <> as suggested really did turn this into a hyperlink.

Before the change:
изображение

After:
изображение

Copy link
Author

@UARTman UARTman Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning page I linked to explains why it doesn't show up unless you try and build the docs locally:

Note that, except for missing_docs, these lints are only available when running rustdoc, not rustc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool.. thanks for the info!

pub fn canvas<F: Fn(&mut Context, LocalRect, &mut Vger) + 'static>(f: F) -> impl View {
Canvas { func: f }
}
Expand Down