Skip to content

Commit 0d3465c

Browse files
committed
chore(deps): upgrade perfectionist and fix new lint violations
Bump `perfectionist` from `3acd734` to `a21a146`. The upstream delta adds three rules: `arc_rc_clone`, `derive_ordering`, and `prefer_raw_string`. `derive_ordering` is silent; the other two surface reasonable violations: - `arc_rc_clone`: switch `progress.clone()` to `Arc::clone(&progress)` in `reporter::progress_and_error_reporter` to make the cheap refcount bump explicit. - `prefer_raw_string`: rewrite the three string literals that embed escaped quotes as raw strings, in `reporter::error_report::text_report` and `tests::cli_errors`. https://claude.ai/code/session_01CoRidYHvni9nKNgxMPXmfQ
1 parent d3dc47f commit 0d3465c

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

dylint.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace.metadata.dylint]
22
libraries = [
3-
{ git = "https://github.com/KSXGitHub/perfectionist", rev = "3acd734c12fbd56d2c760f3c7bc9a19e45e62541" },
3+
{ git = "https://github.com/KSXGitHub/perfectionist", rev = "a21a146eff0ff5b61571160d287fec100879046d" },
44
]
55

66
["perfectionist::single_letter_names"]

src/reporter/error_report/text_report.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ fn test() {
4242
),
4343
};
4444
let actual = TextReport(report).to_string();
45-
let expected = "[error] read_dir \"path/to/a/directory\": Something goes wrong (os error 420)";
45+
let expected = r#"[error] read_dir "path/to/a/directory": Something goes wrong (os error 420)"#;
4646
assert_eq!(actual, expected);
4747
}

src/reporter/progress_and_error_reporter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ where
4747
ReportProgress: Fn(ProgressReport<Size>) + Send + Sync + 'static,
4848
{
4949
let progress = Arc::new(ProgressReportState::default());
50-
let progress_thread = progress.clone();
50+
let progress_thread = Arc::clone(&progress);
5151
let progress_reporter_handle = spawn(move || {
5252
loop {
5353
sleep(progress_report_interval);

tests/cli_errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ fn fs_errors() {
168168
.map(|line| line.trim_start_matches('\r'))
169169
.collect();
170170
let expected_stderr_lines = btreeset! {
171-
"[error] read_dir \"./nested/0\": Permission denied (os error 13)",
172-
"[error] read_dir \"./empty-dir\": Permission denied (os error 13)",
171+
r#"[error] read_dir "./nested/0": Permission denied (os error 13)"#,
172+
r#"[error] read_dir "./empty-dir": Permission denied (os error 13)"#,
173173
};
174174
assert_eq!(actual_stderr_lines, expected_stderr_lines);
175175

0 commit comments

Comments
 (0)