Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
docs: improve links in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin-Niederman committed Feb 19, 2024
1 parent 696f9e6 commit 2d60308
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/pros-devices/src/adi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl AdiPort {
///
/// Creating new `AdiPort`s is inherently unsafe due to the possibility of constructing
/// more than one device on the same port index allowing multiple mutable references to
/// the same hardware device. Prefer using [`crate::peripherals::Peripherals`] to register devices if possible.
/// the same hardware device. Prefer using [`Peripherals`](crate::peripherals::Peripherals) to register devices if possible.
pub const unsafe fn new(index: u8, expander_index: Option<u8>) -> Self {
Self {
index,
Expand Down
4 changes: 1 addition & 3 deletions packages/pros-devices/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ pub mod adi;
pub mod smart;

pub mod battery;
pub mod color;
pub mod competition;
pub mod controller;
pub mod peripherals;
pub mod position;
pub mod screen;
pub mod usd;

//TODO: find a better place to put this
pub mod color;

pub use controller::Controller;
pub use position::Position;
pub use screen::Screen;
2 changes: 1 addition & 1 deletion packages/pros-devices/src/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl Screen {
///
/// Creating new `Screen`s is inherently unsafe due to the possibility of constructing
/// more than one screen at once allowing multiple mutable references to the same
/// hardware device. Prefer using [`crate::peripherals::Peripherals`] to register devices if possible.
/// hardware device. Prefer using [`Peripherals`](crate::peripherals::Peripherals) to register devices if possible.
pub unsafe fn new() -> Self {
Self {
current_line: 0,
Expand Down
4 changes: 2 additions & 2 deletions packages/pros-devices/src/smart/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//!
//! Most devices can be created with a `new` function that generally takes a port number along with other
//! device-specific parameters. All sensors are thread safe, however sensors can only be safely constructed
//! using the [`crate::peripherals`] API.
//! using the [`peripherals`](crate::peripherals) API.
//!
//! In cases where PROS gives the option of a blocking or non-blocking API,
//! the blocking API is used for a synchronous method and the non-blocking API is used to create a future.
Expand Down Expand Up @@ -108,7 +108,7 @@ impl SmartPort {
/// Creating new `SmartPort`s is inherently unsafe due to the possibility of constructing
/// more than one device on the same port index allowing multiple mutable references to
/// the same hardware device. This violates rust's borrow checked guarantees. Prefer using
/// [`crate::peripherals::Peripherals`] to register devices if possible.
/// [`Peripherals`](crate::peripherals::Peripherals) to register devices if possible.
///
/// # Examples
///
Expand Down

0 comments on commit 2d60308

Please sign in to comment.