Skip to content

Commit fe8ea59

Browse files
Update to Rust 1.85, 2024 edition.
1 parent 2c7d131 commit fe8ea59

File tree

12 files changed

+26
-29
lines changed

12 files changed

+26
-29
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions-rs/toolchain@v1 # get rust toolchain for wasm
2424
with:
2525
profile: minimal
26-
toolchain: stable
26+
toolchain: 1.85.1
2727
target: wasm32-unknown-unknown
2828
override: true
2929
- name: Rust Cache # cache the rust build artefacts

.github/workflows/rust.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions-rs/toolchain@v1
1818
with:
1919
profile: minimal
20-
toolchain: 1.74.1
20+
toolchain: 1.85.1
2121
override: true
2222
- uses: actions-rs/cargo@v1
2323
with:
@@ -44,7 +44,7 @@ jobs:
4444
- uses: actions-rs/toolchain@v1
4545
with:
4646
profile: minimal
47-
toolchain: 1.74.1
47+
toolchain: 1.85.1
4848
override: true
4949
- uses: actions-rs/cargo@v1
5050
with:
@@ -71,7 +71,7 @@ jobs:
7171
- uses: actions-rs/toolchain@v1
7272
with:
7373
profile: minimal
74-
toolchain: 1.74.1
74+
toolchain: 1.85.1
7575
target: wasm32-unknown-unknown
7676
override: true
7777
- uses: actions-rs/cargo@v1
@@ -91,7 +91,7 @@ jobs:
9191
- uses: actions-rs/toolchain@v1
9292
with:
9393
profile: minimal
94-
toolchain: 1.74.1
94+
toolchain: 1.85.1
9595
override: true
9696
- run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
9797
- uses: actions-rs/cargo@v1
@@ -107,7 +107,7 @@ jobs:
107107
- uses: actions-rs/toolchain@v1
108108
with:
109109
profile: minimal
110-
toolchain: 1.74.1
110+
toolchain: 1.85.1
111111
override: true
112112
components: rustfmt
113113
- uses: actions-rs/cargo@v1
@@ -123,7 +123,7 @@ jobs:
123123
- uses: actions-rs/toolchain@v1
124124
with:
125125
profile: minimal
126-
toolchain: 1.74.1
126+
toolchain: 1.85.1
127127
override: true
128128
components: clippy
129129
- uses: actions-rs/cargo@v1
@@ -139,7 +139,7 @@ jobs:
139139
- uses: actions-rs/toolchain@v1
140140
with:
141141
profile: minimal
142-
toolchain: 1.74.1
142+
toolchain: 1.85.1
143143
target: wasm32-unknown-unknown
144144
override: true
145145
- name: Download and install Trunk binary

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ keywords = ["legion", "legion-prof", "profiler"]
1111
categories = ["development-tools::profiling"]
1212
license = "Apache-2.0"
1313

14-
edition = "2021"
15-
rust-version = "1.74"
14+
edition = "2024"
15+
rust-version = "1.85"
1616

1717
[features]
1818
default = []

src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use egui_extras::{Column, TableBuilder};
1111
#[cfg(not(target_arch = "wasm32"))]
1212
use itertools::Itertools;
1313
use percentage::{Percentage, PercentageInteger};
14-
use regex::{escape, Regex};
14+
use regex::{Regex, escape};
1515
use serde::{Deserialize, Serialize};
1616

1717
use crate::data::{

src/archive_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::fs::{create_dir, remove_dir_all, File};
1+
use std::fs::{File, create_dir, remove_dir_all};
22
use std::io;
33
use std::path::{Path, PathBuf};
44

src/data.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ pub trait DataSource {
218218
fn fetch_summary_tile(&self, entry_id: &EntryID, tile_id: TileID, full: bool) -> SummaryTile;
219219
fn fetch_slot_tile(&self, entry_id: &EntryID, tile_id: TileID, full: bool) -> SlotTile;
220220
fn fetch_slot_meta_tile(&self, entry_id: &EntryID, tile_id: TileID, full: bool)
221-
-> SlotMetaTile;
221+
-> SlotMetaTile;
222222
}
223223

224224
impl EntryID {
@@ -389,9 +389,9 @@ pub struct EntryIDSlug<'a>(pub &'a EntryID);
389389

390390
impl<'a> fmt::Display for EntryIDSlug<'a> {
391391
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
392-
for (i, e) in self.0 .0.iter().enumerate() {
392+
for (i, e) in self.0.0.iter().enumerate() {
393393
write!(f, "{}", e)?;
394-
if i < self.0 .0.len() - 1 {
394+
if i < self.0.0.len() - 1 {
395395
write!(f, "_")?;
396396
}
397397
}
@@ -403,9 +403,9 @@ pub struct TileIDSlug(pub TileID);
403403

404404
impl fmt::Display for TileIDSlug {
405405
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
406-
write!(f, "{}", self.0 .0.start.0)?;
406+
write!(f, "{}", self.0.0.start.0)?;
407407
write!(f, "_")?;
408-
write!(f, "{}", self.0 .0.stop.0)
408+
write!(f, "{}", self.0.0.stop.0)
409409
}
410410
}
411411

src/http/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::data::{
1717
DataSourceDescription, DataSourceInfo, EntryID, SlotMetaTile, SlotTile, SummaryTile, TileID,
1818
};
1919
use crate::deferred_data::DeferredDataSource;
20-
use crate::http::fetch::{fetch, DataSourceResponse};
20+
use crate::http::fetch::{DataSourceResponse, fetch};
2121
use crate::http::schema::TileRequestRef;
2222

2323
pub struct HTTPClientDataSource {

src/http/fetch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use bytes::Bytes;
22

3-
#[cfg(not(target_arch = "wasm32"))]
4-
use reqwest::blocking::RequestBuilder;
53
#[cfg(target_arch = "wasm32")]
64
use reqwest::RequestBuilder;
5+
#[cfg(not(target_arch = "wasm32"))]
6+
use reqwest::blocking::RequestBuilder;
77

88
pub struct DataSourceResponse {
99
pub body: Bytes,

src/http/server.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ use std::sync::Arc;
22

33
use actix_cors::Cors;
44
use actix_web::{
5-
error, get, http, middleware,
5+
App, HttpServer, Responder, Result, error, get, http, middleware,
66
web::{self, Data},
7-
App, HttpServer, Responder, Result,
87
};
98

109
use serde::Serialize;

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl RandomDataSource {
129129
) {
130130
let time = Timestamp((first.time.0 + last.time.0) / 2);
131131
let util = (first.util + last.util) * 0.5;
132-
let diff = (rng.gen::<f32>() - 0.5) / 1.2_f32.powi(max_level - level);
132+
let diff = (rng.r#gen::<f32>() - 0.5) / 1.2_f32.powi(max_level - level);
133133
let util = (util + diff).at_least(0.0).at_most(1.0);
134134
let point = UtilPoint { time, util };
135135
if level > 0 {
@@ -147,11 +147,11 @@ impl RandomDataSource {
147147
const LEVELS: i32 = 8;
148148
let first = UtilPoint {
149149
time: self.info.interval.start,
150-
util: state.rng.gen(),
150+
util: state.rng.r#gen(),
151151
};
152152
let last = UtilPoint {
153153
time: self.info.interval.stop,
154-
util: state.rng.gen(),
154+
util: state.rng.r#gen(),
155155
};
156156
let mut utilization = Vec::new();
157157
utilization.push(first);

0 commit comments

Comments
 (0)