Skip to content

Commit c7f0297

Browse files
authored
Merge pull request #1948 from klensy/cleanup-2
drop protobuf and derive_more from deps
2 parents ad20446 + c906a11 commit c7f0297

File tree

12 files changed

+23
-53
lines changed

12 files changed

+23
-53
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install toolchain
2424
uses: actions-rs/toolchain@v1
2525
with:
26-
toolchain: 1.70.0
26+
toolchain: 1.73.0
2727
override: true
2828
components: rustfmt, clippy
2929

Cargo.lock

Lines changed: 6 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

collector/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ thousands = "0.2.0"
3737
rustc-demangle = { version = "0.1", features = ["std"] }
3838
similar = "2.2"
3939
console = "0.15"
40-
object = "0.32.1"
40+
object = "0.36.0"
4141
tabled = { version = "0.14.0", features = ["ansi-str"] }
4242
humansize = "2.1.3"
4343
regex = "1.7.1"

collector/src/artifact_stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static RUSTC_HASH_REGEX: OnceLock<Regex> = OnceLock::new();
108108
/// Demangle the symbol and remove rustc mangling hashes.
109109
fn normalize_symbol_name(symbol: &str) -> String {
110110
let regex =
111-
RUSTC_HASH_REGEX.get_or_init(|| Regex::new(r#"(::)?\b[a-z0-9]{15,17}\b(\.\d+)?"#).unwrap());
111+
RUSTC_HASH_REGEX.get_or_init(|| Regex::new(r"(::)?\b[a-z0-9]{15,17}\b(\.\d+)?").unwrap());
112112

113113
let symbol = rustc_demangle::demangle(symbol).to_string();
114114
regex.replace_all(&symbol, "").to_string()

collector/src/bin/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ fn print_binary_stats(
13711371
// Fill in items from the second artifact that are not present in the first one
13721372
if use_diff {
13731373
for (section, size) in items2 {
1374-
if items.get(&section).is_none() {
1374+
if !items.contains_key(&section) {
13751375
rows.push(Row {
13761376
name: section,
13771377
before: 0,

collector/src/runtime/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ fn execute_runtime_benchmark_binary(
209209
let mut command = prepare_command(binary);
210210
command.arg("run");
211211
command.arg("--iterations");
212-
command.arg(&iterations.to_string());
212+
command.arg(iterations.to_string());
213213

214214
if !filter.exclude.is_empty() {
215215
command.args(["--exclude", &filter.exclude.join(",")]);

collector/src/utils/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> anyhow::Result<
1313
let ctx = format!("renaming file {:?} to {:?}", from, to);
1414

1515
if fs::metadata(from)?.is_file() {
16-
return Ok(fs::rename(from, to).with_context(|| ctx.clone())?);
16+
return fs::rename(from, to).with_context(|| ctx.clone());
1717
}
1818

1919
robocopy(from, to, &[&"/move"]).with_context(|| ctx.clone())

collector/src/utils/read2.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mod imp {
158158
impl<'a> Pipe<'a> {
159159
unsafe fn new<P: IntoRawHandle>(p: P, dst: &'a mut Vec<u8>) -> Pipe<'a> {
160160
Pipe {
161-
dst: dst,
161+
dst,
162162
pipe: NamedPipe::from_raw_handle(p.into_raw_handle()),
163163
overlapped: Overlapped::zero(),
164164
done: false,
@@ -196,9 +196,6 @@ mod imp {
196196
if v.capacity() == v.len() {
197197
v.reserve(1);
198198
}
199-
slice::from_raw_parts_mut(
200-
v.as_mut_ptr().offset(v.len() as isize),
201-
v.capacity() - v.len(),
202-
)
199+
slice::from_raw_parts_mut(v.as_mut_ptr().add(v.len()), v.capacity() - v.len())
203200
}
204201
}

database/src/pool/sqlite.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,8 @@ impl Connection for SqliteConnection {
717717
_profile: Profile,
718718
_scenario: crate::Scenario,
719719
) {
720+
#![allow(clippy::diverging_sub_expression)]
721+
720722
// FIXME: this is left for the future, if we ever need to support it. It
721723
// shouldn't be too hard, but we may also want to just intern the raw
722724
// self profile files into sqlite database or something like that, not

site/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ url = "2"
3939
analyzeme = "12.0.0"
4040
inferno = { version = "0.11", default-features = false }
4141
mime = "0.3"
42-
prometheus = "0.13"
42+
# prometheus currently uses plain text, so disable protobuf
43+
prometheus = { version = "0.13", default-features = false }
4344
uuid = { version = "1.3.0", features = ["v4"] }
4445
tera = { version = "1.19", default-features = false }
4546
rust-embed = { version = "6.6.0", features = ["include-exclude", "interpolate-folder-path"] }
4647
humansize = "2"
4748
lru = "0.12.0"
48-
ruzstd = "0.6.0"
49+
ruzstd = "0.7.0"
4950

5051
[target.'cfg(unix)'.dependencies]
5152
jemallocator = "0.5"

site/src/github.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ pub struct UnrolledCommit<'a> {
197197

198198
lazy_static::lazy_static! {
199199
static ref ROLLUP_PR_NUMBER: regex::Regex =
200-
regex::Regex::new(r#"^Auto merge of #(\d+)"#).unwrap();
200+
regex::Regex::new(r"^Auto merge of #(\d+)").unwrap();
201201
static ref ROLLEDUP_PR_NUMBER: regex::Regex =
202-
regex::Regex::new(r#"^Rollup merge of #(\d+)"#).unwrap();
202+
regex::Regex::new(r"^Rollup merge of #(\d+)").unwrap();
203203
}
204204

205205
// Gets the pr number for the associated rollup PR message. Returns None if this is not a rollup PR

site/src/request_handlers/github.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use regex::Regex;
1111

1212
lazy_static::lazy_static! {
1313
static ref BODY_TIMER_BUILD: Regex =
14-
Regex::new(r#"(?:\W|^)@rust-timer\s+build\s+(\w+)(?:\W|$)(?:include=(\S+))?\s*(?:exclude=(\S+))?\s*(?:runs=(\d+))?"#).unwrap();
14+
Regex::new(r"(?:\W|^)@rust-timer\s+build\s+(\w+)(?:\W|$)(?:include=(\S+))?\s*(?:exclude=(\S+))?\s*(?:runs=(\d+))?").unwrap();
1515
static ref BODY_TIMER_QUEUE: Regex =
16-
Regex::new(r#"(?:\W|^)@rust-timer\s+queue(?:\W|$)(?:include=(\S+))?\s*(?:exclude=(\S+))?\s*(?:runs=(\d+))?"#).unwrap();
16+
Regex::new(r"(?:\W|^)@rust-timer\s+queue(?:\W|$)(?:include=(\S+))?\s*(?:exclude=(\S+))?\s*(?:runs=(\d+))?").unwrap();
1717
}
1818

1919
pub async fn handle_github(

0 commit comments

Comments
 (0)