Skip to content

Commit

Permalink
Merge pull request #1351 from sdroege/0.19-backports
Browse files Browse the repository at this point in the history
0.19 backports
  • Loading branch information
sdroege committed Apr 8, 2024
2 parents 29753df + ffc2f11 commit 5e944f2
Show file tree
Hide file tree
Showing 50 changed files with 129 additions and 144 deletions.
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ ue = "ue"
ot = "ot"
siz = "siz"
vai = "vai"
guid = "guid"
96 changes: 45 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cairo/src/font/font_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#[cfg(feature = "v1_16")]
use std::ffi::CString;
use std::hash;
#[cfg(not(feature = "use_glib"))]
use std::ptr;
use std::{cmp::PartialEq, hash};

#[cfg(feature = "use_glib")]
use glib::translate::*;
Expand Down
1 change: 0 additions & 1 deletion cairo/src/image_surface.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use std::{
convert::TryFrom,
ops::{Deref, DerefMut},
rc::Rc,
slice,
Expand Down
2 changes: 1 addition & 1 deletion cairo/src/patterns.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use std::{convert::TryFrom, ops::Deref, ptr};
use std::{ops::Deref, ptr};

use libc::{c_double, c_int, c_uint};

Expand Down
1 change: 0 additions & 1 deletion cairo/src/pdf.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use std::{
convert::TryFrom,
ffi::{CStr, CString},
io, mem,
ops::Deref,
Expand Down
1 change: 0 additions & 1 deletion cairo/src/ps.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use std::{
convert::TryFrom,
ffi::{CStr, CString},
io, mem,
ops::Deref,
Expand Down
2 changes: 1 addition & 1 deletion cairo/src/quartz_surface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use std::{convert::TryFrom, fmt, ops::Deref};
use std::{fmt, ops::Deref};

use ffi::CGContextRef;
#[cfg(feature = "use_glib")]
Expand Down
2 changes: 1 addition & 1 deletion cairo/src/recording_surface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use std::{convert::TryFrom, ops::Deref};
use std::ops::Deref;

#[cfg(feature = "use_glib")]
use glib::translate::*;
Expand Down
1 change: 0 additions & 1 deletion cairo/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#[cfg(not(windows))]
use std::os::unix::prelude::*;
use std::{
convert::TryFrom,
ffi::{CStr, CString},
io, mem,
ops::Deref,
Expand Down
6 changes: 6 additions & 0 deletions cairo/src/user_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ impl<T> UserDataKey<T> {
}
}

impl<T> Default for UserDataKey<T> {
fn default() -> Self {
Self::new()
}
}

// In a safe API for user data we can’t make `get_user_data`
// transfer full ownership of the value to the caller (e.g. by returning `Box<T>`)
// because `self` still has a pointer to that value
Expand Down
2 changes: 1 addition & 1 deletion cairo/src/win32_surface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use std::{convert::TryFrom, ops::Deref};
use std::ops::Deref;

pub use ffi::windows;
#[cfg(feature = "use_glib")]
Expand Down
2 changes: 1 addition & 1 deletion cairo/src/xcb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#[cfg(feature = "use_glib")]
use std::marker::PhantomData;
use std::{convert::TryFrom, ops::Deref, ptr};
use std::{ops::Deref, ptr};

#[cfg(feature = "use_glib")]
use glib::translate::*;
Expand Down
Loading

0 comments on commit 5e944f2

Please sign in to comment.