Skip to content

Commit f000f40

Browse files
Silence some of unsafe docs lint errors
Could be added later
1 parent 6fea44c commit f000f40

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

gdk4-x11/src/x11_display.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ impl X11Display {
5454
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
5555
#[doc(alias = "gdk_x11_display_get_xdisplay")]
5656
#[doc(alias = "get_xdisplay")]
57+
#[allow(clippy::missing_safety_doc)]
5758
pub unsafe fn xdisplay(&self) -> *mut xlib::Display {
5859
ffi::gdk_x11_display_get_xdisplay(self.to_glib_none().0) as *mut xlib::Display
5960
}
@@ -62,13 +63,15 @@ impl X11Display {
6263
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
6364
#[doc(alias = "gdk_x11_display_get_xscreen")]
6465
#[doc(alias = "get_xscreen")]
66+
#[allow(clippy::missing_safety_doc)]
6567
pub unsafe fn xscreen(&self) -> *mut xlib::Screen {
6668
ffi::gdk_x11_display_get_xscreen(self.to_glib_none().0) as *mut xlib::Screen
6769
}
6870

6971
#[cfg(feature = "xlib")]
7072
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
7173
#[doc(alias = "xevent")]
74+
#[allow(clippy::missing_safety_doc)]
7275
pub unsafe fn connect_xevent<F: Fn(&Self, *mut xlib::XEvent) -> glib::Propagation + 'static>(
7376
&self,
7477
f: F,

gdk4-x11/src/x11_screen.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ impl X11Screen {
1414
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
1515
#[doc(alias = "gdk_x11_screen_get_xscreen")]
1616
#[doc(alias = "get_xscreen")]
17+
#[allow(clippy::missing_safety_doc)]
1718
pub unsafe fn xscreen(&self) -> *mut xlib::Screen {
1819
ffi::gdk_x11_screen_get_xscreen(self.to_glib_none().0) as *mut xlib::Screen
1920
}

gdk4/src/gl_texture_builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pub use gl::types::GLsync;
1313
impl GLTextureBuilder {
1414
#[doc(alias = "gdk_gl_texture_builder_build")]
1515
#[must_use = "The builder must be built to be used"]
16+
#[allow(clippy::missing_safety_doc)]
1617
pub unsafe fn build(self) -> Texture {
1718
from_glib_full(ffi::gdk_gl_texture_builder_build(
1819
self.to_glib_none().0,
@@ -23,6 +24,7 @@ impl GLTextureBuilder {
2324

2425
#[doc(alias = "gdk_gl_texture_builder_build")]
2526
#[must_use = "The builder must be built to be used"]
27+
#[allow(clippy::missing_safety_doc)]
2628
pub unsafe fn build_with_release_func<F: FnOnce() + 'static>(self, release_func: F) -> Texture {
2729
unsafe extern "C" fn destroy_closure<F: FnOnce() + 'static>(func: glib::ffi::gpointer) {
2830
let released_func = Box::<F>::from_raw(func as *mut _);

0 commit comments

Comments
 (0)