Skip to content

Commit

Permalink
Merge branch '1Password:master' into noel/add-wait-until
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Apr 10, 2024
2 parents ace55c1 + f6fc4ea commit ecae440
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 43 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
rustfmt:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
Expand Down Expand Up @@ -91,3 +91,10 @@ jobs:

- name: Check soundness
run: cargo miri test windows --features image-data

semver:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 3.3.2 on 2024-12-02

### Fixed
- Fixed compilation on Windows when using the `image-data` feature combined with older Rust compilers.

## 3.3.1 on 2024-12-02

### Changed
Expand Down
43 changes: 7 additions & 36 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arboard"
version = "3.3.1"
version = "3.3.2"
authors = ["Artur Kovacs <kovacs.artur.barnabas@gmail.com>", "Avi Weinstock <aweinstock314@gmail.com>", "Arboard contributors"]
description = "Image and text handling for the OS clipboard."
repository = "https://github.com/1Password/arboard"
Expand Down Expand Up @@ -37,13 +37,13 @@ objc = "0.2"
objc_id = "0.1"
objc-foundation = "0.1"
core-graphics = { version = "0.23", optional = true }
image = { version = "0.24", optional = true, default-features = false, features = ["tiff"] }
image = { version = "0.25", optional = true, default-features = false, features = ["tiff"] }

[target.'cfg(all(unix, not(any(target_os="macos", target_os="android", target_os="emscripten"))))'.dependencies]
log = "0.4"
x11rb = { version = "0.13" }
wl-clipboard-rs = { version = "0.8", optional = true }
image = { version = "0.24", optional = true, default-features = false, features = ["png"] }
image = { version = "0.25", optional = true, default-features = false, features = ["png"] }
parking_lot = "0.12"

[[example]]
Expand Down
3 changes: 3 additions & 0 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ impl<F: FnOnce()> Drop for ScopeGuard<F> {

/// Common trait for sealing platform extension traits.
pub(crate) mod private {
// This is currently unused on macOS, so silence the warning which appears
// since there's no extension traits making use of this trait sealing structure.
#[cfg_attr(target_vendor = "apple", allow(unreachable_pub))]
pub trait Sealed {}

impl Sealed for crate::Get<'_> {}
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The project to which this file belongs is licensed under either of
the Apache 2.0 or the MIT license at the licensee's choice. The terms
and conditions of the chosen license apply to this file.
*/
#![warn(unreachable_pub)]

mod common;
use std::borrow::Cow;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn encode_as_png(image: &ImageData) -> Result<Vec<u8>, Error> {
image.bytes.as_ref(),
image.width as u32,
image.height as u32,
image::ColorType::Rgba8,
image::ExtendedColorType::Rgba8,
)
.map_err(|_| Error::ConversionFailure)?;

Expand Down
7 changes: 5 additions & 2 deletions src/platform/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ mod image_data {
Error::unknown(format!("{}: {}", message, os_error))
}

pub fn add_cf_dibv5(_open_clipboard: OpenClipboard, image: ImageData) -> Result<(), Error> {
pub(super) fn add_cf_dibv5(
_open_clipboard: OpenClipboard,
image: ImageData,
) -> Result<(), Error> {
// This constant is missing in windows-rs
// https://github.com/microsoft/windows-rs/issues/2711
#[allow(non_upper_case_globals)]
Expand Down Expand Up @@ -137,7 +140,7 @@ mod image_data {
}
}

pub fn read_cf_dibv5(dibv5: &[u8]) -> Result<ImageData<'static>, Error> {
pub(super) fn read_cf_dibv5(dibv5: &[u8]) -> Result<ImageData<'static>, Error> {
// The DIBV5 format is a BITMAPV5HEADER followed by the pixel data according to
// https://docs.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats

Expand Down

0 comments on commit ecae440

Please sign in to comment.