Skip to content

Commit

Permalink
Use clippy::pedantic
Browse files Browse the repository at this point in the history
  • Loading branch information
PieKing1215 committed Aug 21, 2024
1 parent 554343f commit 6f8a43b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"rust-analyzer.check.command": "clippy"
}
16 changes: 10 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#![warn(clippy::pedantic)]
#![allow(clippy::missing_errors_doc)]

#[allow(clippy::module_name_repetitions)]
pub mod tweaks;

use hooks::opengl3::ImguiOpenGl3Hooks;
use hudhook::tracing::*;
use hudhook::*;
use imgui::*;
use hudhook::tracing::{error, trace};
use hudhook::{eject, hooks, imgui, windows, Hudhook, ImguiRenderLoop, MessageFilter};
use imgui::{Condition, Io, Key, StyleColor, StyleVar, Ui};
use memory_rs::internal::process_info::ProcessInfo;
use tweaks::editor_camera_speed::EditorCameraSpeedTweak;
use tweaks::editor_placement::EditorPlacementTweak;
Expand All @@ -26,8 +30,8 @@ pub unsafe extern "stdcall" fn DllMain(hmodule: HINSTANCE, reason: u32, _: *mut
println!("Spawned thread");

std::panic::set_hook(Box::new(|panic_info| {
if let Some(_str) = panic_info.payload().downcast_ref::<&str>() {
println!("panic occurred: {_str:?}");
if let Some(str) = panic_info.payload().downcast_ref::<&str>() {
println!("panic occurred: {str:?}");
} else {
println!("panic occurred");
}
Expand Down Expand Up @@ -59,7 +63,7 @@ impl MainHud {
version_string: format!(
"swQolSuite v{}{}",
env!("CARGO_PKG_VERSION"),
option_env!("SHA").map_or_else(|| "".to_string(), |sha| format!(" ({sha})"))
option_env!("SHA").map_or_else(String::new, |sha| format!(" ({sha})"))
),
show: true,
tweaks: vec![],
Expand Down

0 comments on commit 6f8a43b

Please sign in to comment.