Skip to content

Commit

Permalink
Merge pull request #1240 from sdroege/0.18-backports
Browse files Browse the repository at this point in the history
0.18 backports
  • Loading branch information
sdroege authored Dec 9, 2023
2 parents 93f6a02 + eba8f9d commit a44ab02
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gio/src/data_input_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub trait DataInputStreamExtManual: sealed::Sealed + IsA<DataInputStream> + 'sta
if error.is_null() {
let length = length.assume_init();
Ok(FromGlibContainer::from_glib_full_num(
ret as *const _,
ret as *mut u8,
length,
))
} else {
Expand Down Expand Up @@ -268,7 +268,7 @@ pub trait DataInputStreamExtManual: sealed::Sealed + IsA<DataInputStream> + 'sta
let result = if error.is_null() {
let length = length.assume_init();
Ok(FromGlibContainer::from_glib_full_num(
ret as *const _,
ret as *mut u8,
length,
))
} else {
Expand Down
1 change: 1 addition & 0 deletions gio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(clippy::type_complexity)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::missing_safety_doc)]
#![doc = include_str!("../README.md")]

pub use ffi;
Expand Down
3 changes: 2 additions & 1 deletion gio/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,10 @@ where
// use Cancellable::NONE as source obj to fulfill `Send` requirement
let task = unsafe { Task::<bool>::new(Cancellable::NONE, Cancellable::NONE, |_, _| {}) };
let (join, tx) = JoinHandle::new();
task.run_in_thread(move |_, _: Option<&Cancellable>, _| {
task.run_in_thread(move |task, _: Option<&Cancellable>, _| {
let res = panic::catch_unwind(panic::AssertUnwindSafe(func));
let _ = tx.send(res);
unsafe { ffi::g_task_return_pointer(task.to_glib_none().0, ptr::null_mut(), None) }
});

join
Expand Down
1 change: 1 addition & 0 deletions glib/src/boxed_inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ macro_rules! glib_boxed_inline_wrapper {
}

#[allow(clippy::incorrect_clone_impl_on_copy_type)]
#[allow(clippy::non_canonical_clone_impl)]
impl $(<$($generic $(: $bound $(+ $bound2)*)?),+>)? std::clone::Clone for $name $(<$($generic),+>)? {
#[inline]
fn clone(&self) -> Self {
Expand Down
1 change: 1 addition & 0 deletions glib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(clippy::missing_safety_doc)]
#![allow(renamed_and_removed_lints)]
#![doc = include_str!("../README.md")]

pub use bitflags;
Expand Down

0 comments on commit a44ab02

Please sign in to comment.