Skip to content

Commit fca1c84

Browse files
authored
Update to Rust 1.85 (#29)
1 parent 605f4ca commit fca1c84

File tree

18 files changed

+118
-73
lines changed

18 files changed

+118
-73
lines changed

.github/workflows/cargo_machete.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/cargo_shear.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Cargo Shear
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
types: [opened, synchronize]
9+
10+
jobs:
11+
cargo-shear:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install Cargo Shear
18+
uses: taiki-e/install-action@v2.48.7
19+
with:
20+
tool: cargo-shear@1.1.11
21+
22+
- name: Run Cargo Shear
23+
run: |
24+
cargo shear
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PR Branch Name Check
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
check-source-branch:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check PR source branch
12+
run: |
13+
# Check if PR is from a fork
14+
if [[ "${{ github.event.pull_request.head.repo.fork }}" == "true" ]]; then
15+
# Check if PR is from the master/main branch of a fork
16+
if [[ "${{ github.event.pull_request.head.ref }}" == "master" || "${{ github.event.pull_request.head.ref }}" == "main" ]]; then
17+
echo "ERROR: Pull requests from the master/main branch of forks are not allowed, because it prevents maintainers from contributing to your PR"
18+
echo "Please create a feature branch in your fork and submit the PR from that branch instead."
19+
exit 1
20+
fi
21+
fi
22+
23+
- name: Leave comment if PR is from master/main branch of fork d
24+
if: ${{ failure() }}
25+
uses: actions/github-script@v6
26+
with:
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
script: |
29+
github.rest.issues.createComment({
30+
issue_number: context.issue.number,
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
body: '⚠️ **ERROR:** Pull requests from the `master`/`main` branch of forks are not allowed, because it prevents maintainers from contributing to your PR. Please create a feature branch in your fork and submit the PR from that branch instead.'
34+
})

.github/workflows/links.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- name: Restore link checker cache
19-
uses: actions/cache@v3
18+
- name: Restore lychee cache
19+
uses: actions/cache@v4
2020
with:
2121
path: .lycheecache
2222
key: cache-lychee-${{ github.sha }}
@@ -25,10 +25,9 @@ jobs:
2525
# Check https://github.com/lycheeverse/lychee on how to run locally.
2626
- name: Link Checker
2727
id: lychee
28-
uses: lycheeverse/lychee-action@v1.9.0
28+
uses: lycheeverse/lychee-action@v2
2929
with:
3030
fail: true
31-
lycheeVersion: "0.14.3"
3231
# When given a directory, lychee checks only markdown, html and text files, everything else we have to glob in manually.
3332
args: |
3433
--base . --cache --max-cache-age 1d . "**/*.rs" "**/*.toml" "**/*.hpp" "**/*.cpp" "**/CMakeLists.txt" "**/*.py" "**/*.yml"

.github/workflows/rust.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121

22-
- uses: actions-rs/toolchain@v1
22+
- uses: actions-rust-lang/setup-rust-toolchain@v1
2323
with:
24-
profile: default
25-
toolchain: 1.81.0
24+
components: rust-docs, clippy, rustfmt
25+
toolchain: 1.85.0
2626
override: true
2727

2828
- name: Install packages (Linux)
@@ -104,16 +104,12 @@ jobs:
104104
runs-on: ubuntu-latest
105105
steps:
106106
- uses: actions/checkout@v4
107-
- uses: actions-rs/toolchain@v1
107+
- uses: actions-rust-lang/setup-rust-toolchain@v1
108108
with:
109-
profile: minimal
110-
toolchain: 1.81.0
111-
target: wasm32-unknown-unknown
109+
toolchain: 1.85.0
112110
override: true
113-
components: clippy
114-
115-
- name: Set up cargo cache
116-
uses: Swatinem/rust-cache@v2
111+
target: wasm32-unknown-unknown
112+
components: clippy,rustfmt
117113

118114
- name: Check wasm32
119115
uses: actions-rs/cargo@v1
@@ -135,6 +131,6 @@ jobs:
135131
- uses: actions/checkout@v3
136132
- uses: EmbarkStudios/cargo-deny-action@v2
137133
with:
138-
rust-version: "1.81.0"
134+
rust-version: "1.85.0"
139135
log-level: warn
140136
command: check

.vscode/settings.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@
88
"files.autoGuessEncoding": true,
99
"files.insertFinalNewline": true,
1010
"files.trimTrailingWhitespace": true,
11-
// don't share a cargo lock with rust-analyzer.
12-
// see https://github.com/rerun-io/rerun/pull/519 for rationale
11+
12+
// Don't share a cargo lock with rust-analyzer.
13+
// See https://github.com/rerun-io/rerun/pull/519 for rationale.
1314
"rust-analyzer.check.overrideCommand": [
1415
"cargo",
1516
"clippy",
1617
"--target-dir=target_ra",
1718
"--workspace",
1819
"--message-format=json",
1920
"--all-targets",
20-
"--all-features"
21+
"--all-features",
2122
],
2223
"rust-analyzer.cargo.buildScripts.overrideCommand": [
2324
"cargo",
24-
"check",
25+
"clippy",
2526
"--quiet",
2627
"--target-dir=target_ra",
2728
"--workspace",
@@ -33,17 +34,17 @@
3334
// Having Rust Analyzer do this while doing other builds can lead to catastrophic failures.
3435
// INCLUDING attempts to publish a new release!
3536
"rust-analyzer.cargo.buildScripts.enable": false,
37+
38+
// Uncomment the following option and restart rust-analyzer to get it to check code behind `cfg(target_arch=wasm32)`.
39+
// Don't forget to put it in a comment again before committing.
40+
// "rust-analyzer.cargo.target": "wasm32-unknown-unknown",
41+
3642
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", // Use cmake-tools to grab configs.
3743
"C_Cpp.autoAddFileAssociations": false,
3844
"cmake.buildDirectory": "${workspaceRoot}/build/debug",
3945
"cmake.generator": "Ninja", // Use Ninja, just like we do in our just/pixi command.
4046
"rust-analyzer.showUnlinkedFileNotification": false,
41-
"ruff.format.args": [
42-
"--config=pyproject.toml"
43-
],
44-
"ruff.lint.args": [
45-
"--config=pyproject.toml"
46-
],
47+
"ruff.configuration": "pyproject.toml",
4748
"prettier.requireConfig": true,
4849
"prettier.configPath": ".prettierrc.toml",
4950
"[python]": {

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## 0.3.0 - 2025-02-05 - Update to egui 0.31
55
* Update to egui 0.31 [#22](https://github.com/rerun-io/egui_table/pull/22) by [@emilk](https://github.com/emilk)
6-
* Update MSRV to 1.81 [#21](https://github.com/rerun-io/egui_table/pull/21) by [@emilk](https://github.com/emilk)
6+
* Update MSRV to 1.85 [#21](https://github.com/rerun-io/egui_table/pull/21) by [@emilk](https://github.com/emilk)
77
* Fix ghost column when no sticky columns [#20](https://github.com/rerun-io/egui_table/pull/20) by [@EpixScripts](https://github.com/EpixScripts)
88

99

Cargo.toml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ members = ["egui_table", "demo"]
44

55

66
[workspace.package]
7-
edition = "2021"
7+
edition = "2024"
88
license = "MIT OR Apache-2.0"
9-
rust-version = "1.81"
9+
rust-version = "1.85"
1010
version = "0.3.0"
1111

1212

@@ -17,10 +17,8 @@ opt-level = 2 # fast and small wasm
1717
[workspace.dependencies]
1818
egui_table = { version = "0.3.0", path = "egui_table", default-features = false }
1919

20-
document-features = " 0.2.10"
2120
eframe = { version = "0.31.0", default-features = false }
2221
egui = { version = "0.31.0", default-features = false }
23-
emath = { version = "0.31.0", default-features = false }
2422
env_logger = { version = "0.10", default-features = false, features = [
2523
"auto-color",
2624
"humantime",
@@ -41,6 +39,8 @@ web-sys = "0.3.72"
4139
# egui = { path = "../../egui/crates/egui" }
4240
# eframe = { path = "../../egui/crates/eframe" }
4341

42+
# ----------------------------------------------------------------------------------------
43+
# Lints:
4444

4545
[workspace.lints.rust]
4646
unsafe_code = "deny"
@@ -81,6 +81,7 @@ disallowed_methods = "warn" # See clippy.toml
8181
disallowed_names = "warn" # See clippy.toml
8282
disallowed_script_idents = "warn" # See clippy.toml
8383
disallowed_types = "warn" # See clippy.toml
84+
doc_include_without_cfg = "warn"
8485
doc_link_with_quotes = "warn"
8586
doc_markdown = "warn"
8687
empty_enum = "warn"
@@ -100,7 +101,6 @@ fn_params_excessive_bools = "warn"
100101
fn_to_numeric_cast_any = "warn"
101102
from_iter_instead_of_collect = "warn"
102103
get_unwrap = "warn"
103-
if_let_mutex = "warn"
104104
implicit_clone = "warn"
105105
imprecise_flops = "warn"
106106
index_refutable_slice = "warn"
@@ -124,25 +124,25 @@ let_underscore_must_use = "warn"
124124
let_underscore_untyped = "warn"
125125
let_unit_value = "warn"
126126
linkedlist = "warn"
127+
literal_string_with_formatting_args = "warn"
127128
lossy_float_literal = "warn"
128129
macro_use_imports = "warn"
129130
manual_assert = "warn"
130131
manual_clamp = "warn"
131132
manual_instant_elapsed = "warn"
133+
manual_is_power_of_two = "warn"
132134
manual_is_variant_and = "warn"
133135
manual_let_else = "warn"
134136
manual_ok_or = "warn"
135137
manual_string_new = "warn"
136138
map_err_ignore = "warn"
137139
map_flatten = "warn"
138-
map_unwrap_or = "warn"
139140
match_bool = "warn"
140141
match_on_vec_items = "warn"
141142
match_same_arms = "warn"
142143
match_wild_err_arm = "warn"
143144
match_wildcard_for_single_variants = "warn"
144145
mem_forget = "warn"
145-
mismatched_target_os = "warn"
146146
mismatching_type_param_order = "warn"
147147
missing_assert_message = "warn"
148148
missing_enforced_import_renames = "warn"
@@ -157,10 +157,12 @@ needless_for_each = "warn"
157157
needless_pass_by_ref_mut = "warn"
158158
needless_pass_by_value = "warn"
159159
negative_feature_names = "warn"
160+
non_zero_suggestions = "warn"
160161
nonstandard_macro_braces = "warn"
161162
option_as_ref_cloned = "warn"
162163
option_option = "warn"
163164
path_buf_push_overwrite = "warn"
165+
pathbuf_init_then_push = "warn"
164166
ptr_as_ptr = "warn"
165167
ptr_cast_constness = "warn"
166168
pub_underscore_fields = "warn"
@@ -170,12 +172,12 @@ readonly_write_lock = "warn"
170172
redundant_type_annotations = "warn"
171173
ref_as_ptr = "warn"
172174
ref_option_ref = "warn"
173-
ref_patterns = "warn"
174175
rest_pat_in_fully_bound_structs = "warn"
175176
same_functions_in_if_condition = "warn"
176177
semicolon_if_nothing_returned = "warn"
178+
set_contains_or_insert = "warn"
177179
should_panic_without_expect = "warn"
178-
significant_drop_tightening = "warn"
180+
single_char_pattern = "warn"
179181
single_match_else = "warn"
180182
str_split_at_newline = "warn"
181183
str_to_string = "warn"
@@ -187,6 +189,7 @@ string_to_string = "warn"
187189
suspicious_command_arg_space = "warn"
188190
suspicious_xor_used_as_pow = "warn"
189191
todo = "warn"
192+
too_long_first_doc_paragraph = "warn"
190193
too_many_lines = "warn"
191194
trailing_empty_array = "warn"
192195
trait_duplication_in_bounds = "warn"
@@ -197,13 +200,15 @@ unimplemented = "warn"
197200
uninhabited_references = "warn"
198201
uninlined_format_args = "warn"
199202
unnecessary_box_returns = "warn"
203+
unnecessary_literal_bound = "warn"
200204
unnecessary_safety_doc = "warn"
201205
unnecessary_struct_initialization = "warn"
202206
unnecessary_wraps = "warn"
203207
unnested_or_patterns = "warn"
204208
unused_peekable = "warn"
205209
unused_rounding = "warn"
206210
unused_self = "warn"
211+
unused_trait_names = "warn"
207212
unwrap_used = "warn"
208213
use_self = "warn"
209214
useless_transmute = "warn"
@@ -212,4 +217,6 @@ wildcard_dependencies = "warn"
212217
wildcard_imports = "warn"
213218
zero_sized_map_values = "warn"
214219

215-
manual_range_contains = "allow" # this one is just worse imho
220+
manual_range_contains = "allow" # this is better on 'allow'
221+
map_unwrap_or = "allow" # this is better on 'allow'
222+
ref_patterns = "allow" # It's nice to avoid ref pattern, but there are some situations that are hard (impossible?) to express without.

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
* [ ] `git commit -m 'Release 0.x.0 - summary'`
66
* [ ] `cargo publish --quiet -p egui_table`
77
* [ ] `git tag -a 0.x.0 -m 'Release 0.x.0 - summary'`
8-
* [ ] `git pull --tags && git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force && git push origin main ; git push --tags`
8+
* [ ] `git pull --tags ; git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force ; git push --tags`
99
* [ ] Do a GitHub release: https://github.com/rerun-io/egui_table/releases/new

clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# -----------------------------------------------------------------------------
66
# Section identical to scripts/clippy_wasm/clippy.toml:
77

8-
msrv = "1.81"
8+
msrv = "1.85"
99

1010
allow-unwrap-in-tests = true
1111

0 commit comments

Comments
 (0)