WIP save tracing #391
clippy
27 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 27 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0-nightly (e7c0d2750 2024-10-15)
- cargo 1.84.0-nightly (15fbd2f60 2024-10-08)
- clippy 0.1.83 (e7c0d27 2024-10-15)
Annotations
Check failure on line 397 in hook/src/hooks/mod.rs
github-actions / clippy
creating a mutable reference to mutable static is discouraged
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:397:9
|
397 | CB.take();
| ^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
Check failure on line 368 in hook/src/hooks/mod.rs
github-actions / clippy
creating a mutable reference to mutable static is discouraged
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:368:14
|
368 | (CB.as_mut().unwrap())(rip);
| ^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
Check failure on line 620 in hook/src/hooks/mod.rs
github-actions / clippy
creating a mutable reference to mutable static is discouraged
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:620:19
|
620 | drop(unsafe { LOG_GUARD.take() });
| ^^^^^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
Check failure on line 583 in hook/src/hooks/mod.rs
github-actions / clippy
creating a mutable reference to mutable static is discouraged
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:583:40
|
583 | save(&slot, std::mem::take(&mut OPS));
| ^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
help: use `&raw mut` instead to create a raw pointer
|
583 | save(&slot, std::mem::take(&raw mut OPS));
| ~~~~~~~~
Check failure on line 579 in hook/src/hooks/mod.rs
github-actions / clippy
creating a mutable reference to mutable static is discouraged
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:579:13
|
579 | OPS.clear();
| ^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
Check failure on line 271 in hook/src/hooks/mod.rs
github-actions / clippy
creating a shared reference to mutable static is discouraged
error: creating a shared reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:271:40
|
271 | let mut normalized_path = unsafe { SAVES_DIR.as_ref() }?.clone();
| ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
Check failure on line 130 in hook/src/hooks/mod.rs
github-actions / clippy
creating a mutable reference to mutable static is discouraged
error: creating a mutable reference to mutable static is discouraged
--> hook/src/hooks/mod.rs:121:17
|
121 | / OPS.push(Op {
122 | | data: if count == 0 {
123 | | vec![]
124 | | } else {
... |
129 | | stack,
130 | | });
| |__________________^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
Check failure on line 129 in hook/src/lib.rs
github-actions / clippy
creating a shared reference to mutable static is discouraged
error: creating a shared reference to mutable static is discouraged
--> hook/src/lib.rs:129:14
|
129 | unsafe { GLOBALS.as_ref().unwrap() }
| ^^^^^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
= note: `-D static-mut-refs` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(static_mut_refs)]`
Check failure on line 480 in hook/src/hooks/mod.rs
github-actions / clippy
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> hook/src/hooks/mod.rs:480:5
|
480 | impl Into<Action<TreeSpan>> for TreeNode {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `-D clippy::from-over-into` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::from_over_into)]`
help: replace the `Into` implementation with `From<hooks::save::TreeNode>`
|
480 ~ impl From<TreeNode> for Action<TreeSpan> {
481 ~ fn from(val: TreeNode) -> Self {
482 ~ match val {
|
Check failure on line 463 in hook/src/hooks/mod.rs
github-actions / clippy
redundant closure
error: redundant closure
--> hook/src/hooks/mod.rs:463:51
|
463 | base64::decode(base64.as_bytes()).map_err(|e| serde::de::Error::custom(e))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `serde::de::Error::custom`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
Check failure on line 110 in hook/src/hooks/mod.rs
github-actions / clippy
manual `RangeInclusive::contains` implementation
error: manual `RangeInclusive::contains` implementation
--> hook/src/hooks/mod.rs:110:24
|
110 | if ip >= 0x140000000 && ip <= 0x14f000000 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x140000000..=0x14f000000).contains(&ip)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `-D clippy::manual-range-contains` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_range_contains)]`
Check failure on line 461 in hook/src/hooks/mod.rs
github-actions / clippy
function `deserialize` is never used
error: function `deserialize` is never used
--> hook/src/hooks/mod.rs:461:12
|
461 | pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Vec<u8>, D::Error> {
| ^^^^^^^^^^^
Check failure on line 401 in hook/src/hooks/mod.rs
github-actions / clippy
function `main` is never used
error: function `main` is never used
--> hook/src/hooks/mod.rs:401:8
|
401 | fn main() {
| ^^^^
Check failure on line 378 in hook/src/hooks/mod.rs
github-actions / clippy
function `hook` is never used
error: function `hook` is never used
--> hook/src/hooks/mod.rs:378:19
|
378 | pub unsafe fn hook<C, F, R>(
| ^^^^
Check failure on line 377 in hook/src/hooks/mod.rs
github-actions / clippy
static `CB` is never used
error: static `CB` is never used
--> hook/src/hooks/mod.rs:377:16
|
377 | static mut CB: Option<Box<dyn FnMut(u64) -> ()>> = None;
| ^^
Check failure on line 359 in hook/src/hooks/mod.rs
github-actions / clippy
function `exception_handler` is never used
error: function `exception_handler` is never used
--> hook/src/hooks/mod.rs:359:35
|
359 | pub unsafe extern "system" fn exception_handler(
| ^^^^^^^^^^^^^^^^^
Check failure on line 343 in hook/src/hooks/mod.rs
github-actions / clippy
function `remove_hardware_breakpoint` is never used
error: function `remove_hardware_breakpoint` is never used
--> hook/src/hooks/mod.rs:343:19
|
343 | pub unsafe fn remove_hardware_breakpoint() -> Result<(), Box<dyn std::error::Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 324 in hook/src/hooks/mod.rs
github-actions / clippy
function `set_hardware_breakpoint` is never used
error: function `set_hardware_breakpoint` is never used
--> hook/src/hooks/mod.rs:324:19
|
324 | pub unsafe fn set_hardware_breakpoint(
| ^^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 322 in hook/src/hooks/mod.rs
github-actions / clippy
constant `HW_BREAKPOINT_TYPE_WRITE` is never used
error: constant `HW_BREAKPOINT_TYPE_WRITE` is never used
--> hook/src/hooks/mod.rs:322:11
|
322 | const HW_BREAKPOINT_TYPE_WRITE: u64 = 0b01;
| ^^^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 321 in hook/src/hooks/mod.rs
github-actions / clippy
constant `HW_BREAKPOINT_LEN_1` is never used
error: constant `HW_BREAKPOINT_LEN_1` is never used
--> hook/src/hooks/mod.rs:321:11
|
321 | const HW_BREAKPOINT_LEN_1: u64 = 0b00;
| ^^^^^^^^^^^^^^^^^^^
Check failure on line 443 in hook/src/hooks/mod.rs
github-actions / clippy
variant `Seek` is never constructed
error: variant `Seek` is never constructed
--> hook/src/hooks/mod.rs:443:5
|
441 | pub enum Action<S> {
| ------ variant in this enum
442 | Read(usize),
443 | Seek(usize),
| ^^^^
|
= note: `Action` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
Check failure on line 463 in hook/src/hooks/mod.rs
github-actions / clippy
use of deprecated function `base64::decode`: Use Engine::decode
error: use of deprecated function `base64::decode`: Use Engine::decode
--> hook/src/hooks/mod.rs:463:17
|
463 | base64::decode(base64.as_bytes()).map_err(|e| serde::de::Error::custom(e))
| ^^^^^^
Check failure on line 457 in hook/src/hooks/mod.rs
github-actions / clippy
use of deprecated function `base64::encode`: Use Engine::encode
error: use of deprecated function `base64::encode`: Use Engine::encode
--> hook/src/hooks/mod.rs:457:30
|
457 | let base64 = base64::encode(v);
| ^^^^^^
|
= note: `-D deprecated` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(deprecated)]`
Check failure on line 387 in hook/src/hooks/mod.rs
github-actions / clippy
unneeded unit return type
error: unneeded unit return type
--> hook/src/hooks/mod.rs:387:34
|
387 | let r: Box<dyn FnMut(u64) -> ()> = Box::new(cb);
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
Check failure on line 384 in hook/src/hooks/mod.rs
github-actions / clippy
unneeded unit return type
error: unneeded unit return type
--> hook/src/hooks/mod.rs:384:22
|
384 | C: FnMut(u64) -> (),
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit