Skip to content

Commit

Permalink
Fix links in doc comments
Browse files Browse the repository at this point in the history
Now `cargo doc --features use_system_lib` runs without warnings.
  • Loading branch information
ids1024 authored and Drakulix committed Dec 13, 2024
1 parent 8baf0de commit de843bc
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions src/backend/drm/gbm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Framebuffer for GbmFramebuffer {
/// Attach a framebuffer for a [`WlBuffer`]
///
/// This tries to import the buffer to gbm and attach a [`framebuffer::Handle`] for
/// the imported [`BufferObject`].
/// the imported [`BufferObject`][gbm::BufferObject].
///
/// Returns `Ok(None)` for unknown buffer types and buffer types that do not
/// support attaching a framebuffer (e.g. shm-buffers)
Expand Down Expand Up @@ -136,7 +136,7 @@ pub enum Error {
/// Attach a framebuffer for a [`Dmabuf`]
///
/// This tries to import the [`Dmabuf`] using gbm and attach
/// a [`framebuffer::Handle`] for the imported [`BufferObject`]
/// a [`framebuffer::Handle`] for the imported [`BufferObject`][gbm::BufferObject]
#[profiling::function]
pub fn framebuffer_from_dmabuf<A: AsFd + 'static>(
drm: &DrmDeviceFd,
Expand Down Expand Up @@ -181,7 +181,7 @@ pub fn framebuffer_from_dmabuf<A: AsFd + 'static>(
})
}

/// Attach a [`framebuffer::Handle`] to an [`BufferObject`]
/// Attach a [`framebuffer::Handle`] to an [`BufferObject`][gbm::BufferObject]
#[profiling::function]
pub fn framebuffer_from_bo(
drm: &DrmDeviceFd,
Expand Down
2 changes: 1 addition & 1 deletion src/backend/renderer/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::ops::Mul;
pub struct Color32F([f32; 4]);

impl Color32F {
/// Initialize a new [`Color`]
/// Initialize a new [`Color32F`]
#[inline]
pub const fn new(r: f32, g: f32, b: f32, a: f32) -> Self {
Self([r, g, b, a])
Expand Down
2 changes: 1 addition & 1 deletion src/backend/renderer/multigpu/gbm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<R, A: AsFd + Clone + Send + 'static> GbmGlesBackend<R, A> {
/// Sets the default flags to use for allocating buffers via the [`GbmAllocator`]
/// provided by these backends devices.
///
/// Only affects nodes added via [`add_node`] *after* calling this method.
/// Only affects nodes added via [`add_node`][Self::add_node] *after* calling this method.
pub fn set_allocator_flags(&mut self, flags: GbmBufferFlags) {
self.allocator_flags = flags;
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/renderer/multigpu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! [`GraphicsApi`] implementation will allow you to create [`MultiRenderer`]s.
//!
//! smithay provides the following graphics apis:
//! - [`egl::EglGlesBackend`]
//! - [`gbm::GbmGlesBackend`]
//!
//! A [`MultiRenderer`] gets created using two [`DrmNode`]s to identify gpus.
//! One gpu will be referred to as the render-gpu, the other as the target-gpu.
Expand Down
2 changes: 1 addition & 1 deletion src/desktop/space/element/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ macro_rules! space_elements_internal {
}

/// Aggregate multiple types implementing [`SpaceElement`] into a single enum type to be used
/// with a [`Space`].
/// with a [`Space`][super::Space].
///
/// # Example
///
Expand Down
4 changes: 2 additions & 2 deletions src/utils/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Time<Monotonic> {
/// Returns the time in milliseconds
///
/// This should match timestamps from libinput:
/// https://wayland.freedesktop.org/libinput/doc/latest/timestamps.html
/// <https://wayland.freedesktop.org/libinput/doc/latest/timestamps.html>
pub fn as_millis(&self) -> u32 {
// Assume monotonic clock (but not realitime) fits as milliseconds in 32-bit
debug_assert!(self.tp.tv_sec >= 0);
Expand All @@ -80,7 +80,7 @@ impl Time<Monotonic> {
/// Returns the time in microseconds
///
/// This should match timestamps from libinput:
/// https://wayland.freedesktop.org/libinput/doc/latest/timestamps.html
/// <https://wayland.freedesktop.org/libinput/doc/latest/timestamps.html>
pub fn as_micros(&self) -> u64 {
// Assume monotonic clock (but not realitime) fits as microseconds in 64-bit
debug_assert!(self.tp.tv_sec >= 0);
Expand Down
8 changes: 4 additions & 4 deletions src/wayland/commit_timing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub struct CommitTimingManagerState {
impl CommitTimingManagerState {
/// Create a new [`WpCommitTimingManagerV1`] global
//
/// The id provided by [`FifoManagerState::global`] may be used to
/// The id provided by [`CommitTimingManagerState::global`] may be used to
/// remove or disable this global in the future.
pub fn new<D>(display: &DisplayHandle) -> Self
where
Expand All @@ -121,7 +121,7 @@ impl CommitTimingManagerState {

/// Create a new unmanaged [`WpCommitTimingManagerV1`] global
//
/// The id provided by [`FifoManagerState::global`] may be used to
/// The id provided by [`CommitTimingManagerState::global`] may be used to
/// remove or disable this global in the future.
pub fn unmanaged<D>(display: &DisplayHandle) -> Self
where
Expand All @@ -143,12 +143,12 @@ impl CommitTimingManagerState {
Self { global, is_managed }
}

/// Returns the id of the [`WpFifoManagerV1`] global.
/// Returns the id of the [`WpCommitTimingManagerV1`] global.
pub fn global(&self) -> GlobalId {
self.global.clone()
}

/// Returns if this [`FifoManagerState`] operates in managed mode.
/// Returns if this [`CommitTimingManagerState`] operates in managed mode.
pub fn is_managed(&self) -> bool {
self.is_managed
}
Expand Down
10 changes: 5 additions & 5 deletions src/wayland/foreign_toplevel_list/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl ForeignToplevelHandle {
resource.data::<Self>().cloned()
}

/// Retrieve [`ExtForeignToplevelHandleV1`](wayland_protocols::ext::foreign_toplevel_list::v1::server::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1)
/// Retrieve [`ExtForeignToplevelHandleV1`]
/// instances for this handle.
pub fn resources(&self) -> Vec<ExtForeignToplevelHandleV1> {
let inner = self.inner.0.lock().unwrap();
Expand All @@ -173,8 +173,8 @@ impl ForeignToplevelHandle {
.collect()
}

/// Retrieve [`ExtForeignToplevelHandleV1`](wayland_protocols::ext::foreign_toplevel_list::v1::server::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1)
/// instances for this handle of a given [`Client`](wayland_server::Client).
/// Retrieve [`ExtForeignToplevelHandleV1`]
/// instances for this handle of a given [`Client`].
pub fn resources_for_client(&self, client: &Client) -> Vec<ExtForeignToplevelHandleV1> {
self.resources()
.into_iter()
Expand All @@ -189,7 +189,7 @@ impl ForeignToplevelHandle {

/// The title of the toplevel has changed.
///
/// [Self::done] has to be called to finalize the update
/// [Self::send_done] has to be called to finalize the update
pub fn send_title(&self, title: &str) {
let mut inner = self.inner.0.lock().unwrap();
if inner.title == title {
Expand All @@ -207,7 +207,7 @@ impl ForeignToplevelHandle {

/// The app_id of the toplevel has changed.
///
/// [Self::done] has to be called to finalize the update
/// [Self::send_done] has to be called to finalize the update
pub fn send_app_id(&self, app_id: &str) {
let mut inner = self.inner.0.lock().unwrap();
if inner.app_id == app_id {
Expand Down
4 changes: 2 additions & 2 deletions src/wayland/xdg_system_bell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//!
//! This protocol enables clients to ring the system bell.
//!
//! In order to advertise system bell global call [XdgSystemBellState::new] and delegate
//! events to it with [delegate_xdg_system_bell].
//! In order to advertise system bell global call [`XdgSystemBellState::new`] and delegate
//! events to it with [`delegate_xdg_system_bell`][crate::delegate_xdg_system_bell].
//!
//! ```
//! use smithay::wayland::xdg_system_bell::{XdgSystemBellState, XdgSystemBellHandler};
Expand Down
2 changes: 1 addition & 1 deletion src/wayland/xdg_toplevel_icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! This protocol allows clients to set icons for their toplevel surfaces either via the XDG icon stock (using an icon name), or from pixel data.
//!
//! In order to advertise toplevel icon global call [XdgToplevelIconManager::new] and delegate
//! events to it with [delegate_xdg_toplevel_icon].
//! events to it with [`delegate_xdg_toplevel_icon`][crate::delegate_xdg_toplevel_icon].
//! Currently attached icon is available in double-buffered [ToplevelIconCachedState]
use std::{
Expand Down
4 changes: 2 additions & 2 deletions src/xwayland/xwm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
//! To use this functionality you must first spawn an
//! [`XWayland`](super::XWayland) instance to attach a [`X11Wm`] to.
//!
//! # Associating an [X11Surface] with a [WlSurface]
//! # Associating an [`X11Surface`] with a [`WlSurface`][wayland_server::protocol::wl_surface::WlSurface]
//!
//! When an X11 window is created, XWayland will associate it with a
//! `wl_surface` that it creates via the wayland connection. This happens in two
//! steps:
//!
//! - Via the [xwayland shell](crate::wayland::xwayland::shell) protocol, a
//! - Via the [xwayland shell](crate::wayland::xwayland_shell) protocol, a
//! serial number is set on the surface, and it is given the
//! "xwayland_shell" role.
//! - Via the X11 connection, a matching `WL_SURFACE_SERIAL` atom is set on the
Expand Down
2 changes: 1 addition & 1 deletion src/xwayland/xwm/settings.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Types related to XSETTINGS handling
//!
//! See https://specifications.freedesktop.org/xsettings-spec/0.5/
//! See <https://specifications.freedesktop.org/xsettings-spec/0.5/>
use std::{borrow::Borrow, collections::HashMap, hash::Hash};

Expand Down
2 changes: 1 addition & 1 deletion src/xwayland/xwm/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ impl X11Surface {
///
/// XWayland will set this if it has bound the [xwayland
/// shell](crate::wayland::xwayland_shell) protocol on the wayland side.
/// Otherwise, it will set [wl_surface_id] instead.
/// Otherwise, it will set [`wl_surface_id`][Self::wl_surface_id] instead.
pub fn wl_surface_serial(&self) -> Option<u64> {
self.state.lock().unwrap().wl_surface_serial
}
Expand Down

0 comments on commit de843bc

Please sign in to comment.