Skip to content

Commit 925a412

Browse files
dcz-selfdcztomstokes
authored
Fix the CI pipeline (#1769)
* Relax clippy warnings and unbreak ci * clippy: Fix abs_diff warning * doc: Fix redundant-explicit-link errors rustdoc::redundant-explicit-link matches more cases in the nightly rust version. Remove the redundant links that trigger the warning, which is processed as an error in CI due to `-D warnings` in the rustdoc flags. The three redundant links all refer to items that are imported into the current file and therefore do not require explicit, absolute links to resolve. --------- Co-authored-by: dcz <[email protected]> Co-authored-by: Tom Stokes <[email protected]>
1 parent aaa1966 commit 925a412

File tree

10 files changed

+16
-8
lines changed

10 files changed

+16
-8
lines changed

anvil/src/input_handler.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ use smithay::{
6666
};
6767

6868
impl<BackendData: Backend> AnvilState<BackendData> {
69+
// Allow in this method because of existing usage
70+
#[allow(clippy::uninlined_format_args)]
6971
fn process_common_key_action(&mut self, action: KeyAction) {
7072
match action {
7173
KeyAction::None => (),

anvil/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ static POSSIBLE_BACKENDS: &[&str] = &[
1212
static GLOBAL: profiling::tracy_client::ProfiledAllocator<std::alloc::System> =
1313
profiling::tracy_client::ProfiledAllocator::new(std::alloc::System, 10);
1414

15+
// Allow in this function because of existing usage
16+
#[allow(clippy::uninlined_format_args)]
1517
fn main() {
1618
if let Ok(env_filter) = tracing_subscriber::EnvFilter::try_from_default_env() {
1719
tracing_subscriber::fmt()

anvil/src/udev.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Allow in this module because of existing usage
2+
#![allow(clippy::uninlined_format_args)]
13
use std::{
24
collections::hash_map::HashMap,
35
io,

src/backend/egl/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ impl EGLBufferReader {
10421042
/// Try to receive [`EGLBuffer`] from a given [`WlBuffer`].
10431043
///
10441044
/// In case the buffer is not managed by EGL (but e.g. the [`wayland::shm` module](crate::wayland::shm))
1045-
/// a [`BufferAccessError::NotManaged`](crate::backend::egl::BufferAccessError::NotManaged) is returned.
1045+
/// a [`BufferAccessError::NotManaged`] is returned.
10461046
#[profiling::function]
10471047
pub fn egl_buffer_contents(
10481048
&self,

src/backend/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Allow in this module because of existing usage
2+
#![allow(clippy::uninlined_format_args)]
13
//! Backend (rendering/input) helpers
24
//!
35
//! This module provides helpers for interaction with the operating system.

src/input/keyboard/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ impl<D: SeatHandler + 'static> KeyboardHandle<D> {
942942
/// [`FilterResult::Intercept`] a value can be passed to be returned by the whole function.
943943
/// This mechanism can be used to implement compositor-level key bindings for example.
944944
///
945-
/// The module [`keysyms`](crate::input::keyboard::keysyms) exposes definitions of all possible keysyms
945+
/// The module [`keysyms`] exposes definitions of all possible keysyms
946946
/// to be compared against. This includes non-character keysyms, such as XF86 special keys.
947947
#[instrument(level = "trace", parent = &self.arc.span, skip(self, data, filter))]
948948
pub fn input<T, F>(

src/utils/serial.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ impl Eq for Serial {}
2222
impl PartialOrd for Serial {
2323
#[inline]
2424
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
25-
let distance = if self.0 > other.0 {
26-
self.0 - other.0
27-
} else {
28-
other.0 - self.0
29-
};
25+
let distance = self.0.abs_diff(other.0);
3026
if distance < u32::MAX / 2 {
3127
self.0.partial_cmp(&other.0)
3228
} else {

src/wayland/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Allow in this module because of existing usage
2+
#![allow(clippy::uninlined_format_args)]
13
//! Protocol-related utilities
24
//!
35
//! This module contains several handlers to manage the Wayland protocol

src/wayland/selection/data_device/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ where
259259
/// You need to provide the available mime types for this selection.
260260
///
261261
/// Whenever a client requests to read the selection, your callback will
262-
/// receive a [`SelectionHandler::send_selection`](crate::wayland::selection::SelectionHandler::send_selection) event.
262+
/// receive a [`SelectionHandler::send_selection`] event.
263263
#[instrument(name = "wayland_data_device", level = "debug", skip(dh, seat, user_data), fields(seat = seat.name()))]
264264
pub fn set_data_device_selection<D>(
265265
dh: &DisplayHandle,

src/xwayland/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Allow in this module because of existing usage
2+
#![allow(clippy::uninlined_format_args)]
13
//! XWayland utilities
24
//!
35
//! This module contains helpers to manage XWayland from your compositor, in order

0 commit comments

Comments
 (0)