opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[opentitanlib] Address upcoming lints, UartKey comparison fix.

Open jrvanwhy opened this issue 1 year ago • 1 comments

Address compiler lints from nightly-2024-01-01. This will enable updating the nightly Rust toolchain.

One of those lints points out that proxy::nonblocking_uart::UartKey compares wide pointers including metadata. Instead, UartKey should only consider the address portion of the pointer. This adjust UartKey's Hash and PartialEq implementations to only consider the address portion of the pointer, and adds a test for the Hash implementation.

jrvanwhy avatar Feb 13 '24 21:02 jrvanwhy

@jesultra: I added you so you can double-check that I correctly understood the purpose of UartKey.

jrvanwhy avatar Feb 13 '24 21:02 jrvanwhy