Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update rust crate winit to 0.29 #93

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: rust audit
uses: actions-rs/audit-check@v1
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
40 changes: 17 additions & 23 deletions .github/workflows/clippy-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,38 @@ on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
clippy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install system deps
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libxdo-dev libayatana-appindicator3-dev
- name: install stable
uses: actions-rs/toolchain@v1

- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: clippy

- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings
- run: cargo clippy --all-targets --all-features -- -D warnings

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install stable
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt

- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v4
- name: covector status
uses: jbolda/covector/packages/action@covector-v0
id: covector
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT

name: version or publish
name: covector version or publish

on:
push:
Expand All @@ -19,12 +19,11 @@ jobs:
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v4

- name: cargo login
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}

- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
Expand All @@ -33,6 +32,8 @@ jobs:
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
Expand All @@ -43,8 +44,8 @@ jobs:
uses: tauri-apps/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: release/version-updates
title: Apply Version Updates From Current Changes
commit-message: 'apply version updates'
labels: 'version updates'
branch: 'release'
body: ${{ steps.covector.outputs.change }}
20 changes: 6 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "macos-latest", "ubuntu-latest"]
platform: ["windows-latest", "macos-latest", "ubuntu-latest"]

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: install system deps
if: contains(matrix.os, 'ubuntu')
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libxdo-dev libayatana-appindicator3-dev

- name: install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- uses: actions-rs/cargo@v1
with:
command: test
- uses: dtolnay/rust-toolchain@stable
- run: cargo test
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ core-graphics = "0.23.1"
png = "0.17"

[dev-dependencies]
winit = "0.28"
winit = "0.29"
tao = "0.22"
image = "0.24"
eframe = "0.23"
8 changes: 4 additions & 4 deletions examples/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn main() {
gtk::main();
});

let event_loop = EventLoopBuilder::new().build();
let event_loop = EventLoopBuilder::new().build().unwrap();

#[cfg(not(target_os = "linux"))]
let mut tray_icon = Some(
Expand All @@ -46,13 +46,13 @@ fn main() {
let menu_channel = MenuEvent::receiver();
let tray_channel = TrayIconEvent::receiver();

event_loop.run(move |_event, _, control_flow| {
*control_flow = ControlFlow::Poll;
event_loop.run(move |_event, event_loop| {
event_loop.set_control_flow(ControlFlow::Poll);

if let Ok(event) = tray_channel.try_recv() {
println!("{event:?}");
}
})
});
}

fn load_icon(path: &std::path::Path) -> tray_icon::Icon {
Expand Down
2 changes: 2 additions & 0 deletions src/platform_impl/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ impl TrayIcon {
};
if let Some(tooltip) = &tooltip {
let tip = util::encode_wide(tooltip.as_ref());
#[allow(clippy::manual_memcpy)]
for i in 0..tip.len().min(128) {
nid.szTip[i] = tip[i];
}
Expand Down Expand Up @@ -410,6 +411,7 @@ unsafe fn register_tray_icon(
if let Some(tooltip) = tooltip {
flags |= NIF_TIP;
let tip = util::encode_wide(tooltip);
#[allow(clippy::manual_memcpy)]
for i in 0..tip.len().min(128) {
sz_tip[i] = tip[i];
}
Expand Down