Skip to content

Commit 8d277a6

Browse files
authored
Merge pull request #1827 from sdroege/clippy-warnings
Fix various new clippy warnings
2 parents e39dfca + d8921e0 commit 8d277a6

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

gdk4-wayland/src/wayland_surface.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ use glib::translate::*;
77
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
88
use wayland_client::{backend::ObjectId, protocol::wl_surface::WlSurface, Proxy};
99

10-
use crate::{ffi, prelude::*, WaylandSurface};
10+
#[cfg(feature = "wayland_crate")]
11+
use crate::ffi;
12+
use crate::{prelude::*, WaylandSurface};
1113

1214
mod sealed {
1315
pub trait Sealed {}

gtk4-macros/src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,10 @@ pub fn composite_template_derive(input: TokenStream) -> TokenStream {
256256
/// exposed to the template scope. It can take the following options:
257257
/// - `name` renames the callback. Defaults to the function name if not defined.
258258
/// - `function` ignores the first value when calling the callback and disallows
259-
/// `self`. Useful
260-
/// for callbacks called from `<closure>` tags.
259+
/// `self`. Useful for callbacks called from `<closure>` tags.
261260
/// - `function = false` reverts the effects of `functions` used on the `impl`,
262-
/// so the callback
263-
/// gets the first value and can take `self` again. Mainly useful for callbacks
264-
/// that are invoked with `swapped="true"`.
261+
/// so the callback gets the first value and can take `self` again. Mainly useful
262+
/// for callbacks that are invoked with `swapped="true"`.
265263
///
266264
/// The `rest` attribute can be placed on the last argument of a template
267265
/// callback. This attribute must be used on an argument of type

gtk4/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,15 @@ The [`gtk`](mod@crate) and [`gdk`][`mod@gdk`] crates have some run-time safety a
119119
checks.
120120

121121
- Any constructor or free function will panic if called before [`init`][`fn@init`] or on
122-
a non-main thread.
122+
a non-main thread.
123123

124-
- Any [`&str`] or [`&Path`](std::path::Path) parameter with an interior null (`\0`) character will
125-
cause a panic.
124+
- Any [`&str`] or [`&Path`](std::path::Path) parameter with an interior null (`\0`) character will cause a panic.
126125

127126
- Some functions will panic if supplied out-of-range integer parameters. All
128-
such cases will be documented individually but they are not yet.
127+
such cases will be documented individually but they are not yet.
129128

130129
- A panic in a closure that handles signals or in any other closure passed
131-
to a [`gtk`](mod@crate) function will abort the process.
130+
to a [`gtk`](mod@crate) function will abort the process.
132131

133132
## Features
134133

0 commit comments

Comments
 (0)