diff --git a/gdk4-wayland/src/wayland_surface.rs b/gdk4-wayland/src/wayland_surface.rs index 2faa70029953..ef576ee5fc55 100644 --- a/gdk4-wayland/src/wayland_surface.rs +++ b/gdk4-wayland/src/wayland_surface.rs @@ -7,7 +7,9 @@ use glib::translate::*; #[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))] use wayland_client::{backend::ObjectId, protocol::wl_surface::WlSurface, Proxy}; -use crate::{ffi, prelude::*, WaylandSurface}; +#[cfg(feature = "wayland_crate")] +use crate::ffi; +use crate::{prelude::*, WaylandSurface}; mod sealed { pub trait Sealed {} diff --git a/gtk4-macros/src/lib.rs b/gtk4-macros/src/lib.rs index 708fe008a982..74aa6394b8db 100644 --- a/gtk4-macros/src/lib.rs +++ b/gtk4-macros/src/lib.rs @@ -256,12 +256,10 @@ pub fn composite_template_derive(input: TokenStream) -> TokenStream { /// exposed to the template scope. It can take the following options: /// - `name` renames the callback. Defaults to the function name if not defined. /// - `function` ignores the first value when calling the callback and disallows -/// `self`. Useful -/// for callbacks called from `` tags. +/// `self`. Useful for callbacks called from `` tags. /// - `function = false` reverts the effects of `functions` used on the `impl`, -/// so the callback -/// gets the first value and can take `self` again. Mainly useful for callbacks -/// that are invoked with `swapped="true"`. +/// so the callback gets the first value and can take `self` again. Mainly useful +/// for callbacks that are invoked with `swapped="true"`. /// /// The `rest` attribute can be placed on the last argument of a template /// callback. This attribute must be used on an argument of type diff --git a/gtk4/README.md b/gtk4/README.md index acba3549a1e2..42560aa9291e 100644 --- a/gtk4/README.md +++ b/gtk4/README.md @@ -119,16 +119,15 @@ The [`gtk`](mod@crate) and [`gdk`][`mod@gdk`] crates have some run-time safety a checks. - Any constructor or free function will panic if called before [`init`][`fn@init`] or on -a non-main thread. + a non-main thread. -- Any [`&str`] or [`&Path`](std::path::Path) parameter with an interior null (`\0`) character will -cause a panic. +- Any [`&str`] or [`&Path`](std::path::Path) parameter with an interior null (`\0`) character will cause a panic. - Some functions will panic if supplied out-of-range integer parameters. All -such cases will be documented individually but they are not yet. + such cases will be documented individually but they are not yet. - A panic in a closure that handles signals or in any other closure passed -to a [`gtk`](mod@crate) function will abort the process. + to a [`gtk`](mod@crate) function will abort the process. ## Features