mirror of
https://github.com/szymon-jozef/libnotify-rs.git
synced 2026-10-27 19:20:43 +01:00
chore: disable warnings for generated code
This commit is contained in:
@@ -1 +1,3 @@
|
|||||||
|
#![allow(warnings)]
|
||||||
|
#![allow(clippy::all)]
|
||||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
|
||||||
|
|
||||||
pub unsafe fn c_str_to_rs_str_and_free(c_str: *mut std::os::raw::c_char) -> Option<String> {
|
pub unsafe fn c_str_to_rs_str_and_free(c_str: *mut std::os::raw::c_char) -> Option<String> {
|
||||||
if c_str.is_null() {
|
if c_str.is_null() {
|
||||||
return None;
|
return None;
|
||||||
@@ -9,7 +7,7 @@ pub unsafe fn c_str_to_rs_str_and_free(c_str: *mut std::os::raw::c_char) -> Opti
|
|||||||
.to_string_lossy()
|
.to_string_lossy()
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
unsafe { g_free(c_str as *mut std::ffi::c_void) };
|
unsafe { crate::libnotify::g_free(c_str as *mut std::ffi::c_void) };
|
||||||
|
|
||||||
Some(normal_string)
|
Some(normal_string)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user