Commit 705ef65
committed
chore: fix clippy warning in rust 1.87.0
The code is shorter and probably clearer in its intent now.
The error was:
```
warning: use `std::ptr::eq` when comparing raw pointers
--> rusqlite_migration/src/lib.rs:108:35
|
108 | (Some(a), Some(b)) => addr_of!(*a) as usize == addr_of!(*b) as usize,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(addr_of!(*a), addr_of!(*b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq
= note: `#[warn(clippy::ptr_eq)]` on by default
warning: use `std::ptr::eq` when comparing raw pointers
--> rusqlite_migration/src/lib.rs:114:35
|
114 | (Some(a), Some(b)) => addr_of!(*a) as usize == addr_of!(*b) as usize,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(addr_of!(*a), addr_of!(*b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq
warning: `rusqlite_migration` (lib) generated 2 warnings (run `cargo clippy --fix --lib -p rusqlite_migration` to apply 2 suggestions)
```1 parent dd56ade commit 705ef65
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
0 commit comments