Skip to content

Commit

Permalink
src: Windows: remove useless transmute
Browse files Browse the repository at this point in the history
This fixes following clippy warning:

	Error:    --> src\lib.rs:605:31
	    |
	605 |         let handle = unsafe { mem::transmute(handle) };
	    |                               ^^^^^^^^^^^^^^^^^^^^^^
	    |
	    = note: `-D clippy::useless-transmute` implied by `-D warnings`
	    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute

Signed-off-by: Richard Leitner <dev@g0hl1n.net>
  • Loading branch information
g0hl1n committed Jan 13, 2023
1 parent be37c39 commit 487581c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/lib.rs
Expand Up @@ -602,7 +602,6 @@ impl TryFrom<NativeBlockingSerialPort> for SerialStream {
log::error!("unable to open new async file handle");
return Err(crate::Error::from(StdIoError::last_os_error()));
}
let handle = unsafe { mem::transmute(handle) };

// Construct NamedPipe and COMPort from Handle
//
Expand Down

0 comments on commit 487581c

Please sign in to comment.