Skip to content

Commit 3230dc7

Browse files
committed
Fix lints
1 parent 6c11e41 commit 3230dc7

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

.cargo/config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ rustflags = [
4343
"-Wclippy::map_err_ignore",
4444
"-Wclippy::map_flatten",
4545
"-Wclippy::map_unwrap_or",
46-
"-Wclippy::match_on_vec_items",
4746
"-Wclippy::match_same_arms",
4847
"-Wclippy::match_wild_err_arm",
4948
"-Wclippy::match_wildcard_for_single_variants",

crash-handler/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ pub fn write_stderr(s: &'static str) {
3636

3737
cfg_if::cfg_if! {
3838
if #[cfg(all(unix, not(target_os = "macos")))] {
39-
/// The sole purpose of the unix module is to hook pthread_create to ensure
39+
/// The sole purpose of the unix module is to hook `pthread_create` to ensure
4040
/// an alternate stack is installed for every native thread in case of a
41-
/// stack overflow. This doesn't apply to MacOS as it uses exception ports,
41+
/// stack overflow. This doesn't apply to `MacOS` as it uses exception ports,
4242
/// which are always delivered to a specific thread owned by the exception
4343
/// handler
4444
pub mod unix;

minidumper-test/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,14 @@ fn make_dump_path(id: &str) -> PathBuf {
101101
pub fn spinup_server(id: &str, dump_path: Option<PathBuf>) -> Server {
102102
let dump_path = dump_path.unwrap_or_else(|| make_dump_path(id));
103103

104-
if dump_path.exists() {
105-
if let Err(e) = std::fs::remove_file(&dump_path) {
104+
if dump_path.exists()
105+
&& let Err(e) = std::fs::remove_file(&dump_path) {
106106
panic!(
107107
"failed to remove existing dump file {}: {}",
108108
dump_path.display(),
109109
e
110110
);
111111
}
112-
}
113112

114113
let mut server = minidumper::Server::with_name(id).expect("failed to start server");
115114

minidumper/examples/diskwrite.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ fn main() {
2121

2222
let dump_path = std::path::PathBuf::from(format!("dumps/{uuid}.dmp"));
2323

24-
if let Some(dir) = dump_path.parent() {
25-
if !dir.try_exists()? {
24+
if let Some(dir) = dump_path.parent()
25+
&& !dir.try_exists()? {
2626
std::fs::create_dir_all(dir)?;
2727
}
28-
}
2928
let file = std::fs::File::create(&dump_path)?;
3029
Ok((file, dump_path))
3130
}

minidumper/src/ipc/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ impl Server {
472472
// many layers, so really, we are falling back on Windows to actually correctly handle
473473
// if the interior pointers have become invalid which it should? do ok with
474474
let result =
475-
minidump_writer::minidump_writer::MinidumpWriter::dump_crash_context(crash_context, None, &mut minidump_file);
475+
minidump_writer::minidump_writer::MinidumpWriter::dump_crash_context(&crash_context, None, &mut minidump_file);
476476
} else if #[cfg(target_os = "macos")] {
477477
let mut writer = minidump_writer::minidump_writer::MinidumpWriter::with_crash_context(crash_context);
478478
let result = writer.dump(&mut minidump_file);

0 commit comments

Comments
 (0)