Skip to content

Commit

Permalink
try to placate clippy on github, no problem locally
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed May 2, 2024
1 parent c240083 commit f2df8aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@ fn updatetitle(c: *mut bindgen::Client) {
/* hack to mark broken clients */
libc::strcpy(
&mut (*c).name as *mut _,
bindgen::broken as *const _ as *const _,
bindgen::broken.as_ptr() as *const i8,

Check failure on line 3294 in src/main.rs

View workflow job for this annotation

GitHub Actions / clippy

casting raw pointers to the same type and constness is unnecessary (`*const i8` -> `*const i8`)

error: casting raw pointers to the same type and constness is unnecessary (`*const i8` -> `*const i8`) --> src/main.rs:3294:17 | 3294 | bindgen::broken.as_ptr() as *const i8, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bindgen::broken.as_ptr()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`

Check failure on line 3294 in src/main.rs

View workflow job for this annotation

GitHub Actions / clippy

casting raw pointers to the same type and constness is unnecessary (`*const i8` -> `*const i8`)

error: casting raw pointers to the same type and constness is unnecessary (`*const i8` -> `*const i8`) --> src/main.rs:3294:17 | 3294 | bindgen::broken.as_ptr() as *const i8, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bindgen::broken.as_ptr()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
);
}
}
Expand Down

0 comments on commit f2df8aa

Please sign in to comment.