chore: fix import ordering and formatting in core and client

This commit is contained in:
2026-06-14 04:12:37 +08:00
parent 4e4c9cee65
commit ee65e284c4
6 changed files with 44 additions and 42 deletions

View File

@@ -173,22 +173,18 @@ impl Connection {
pub fn set_dtr(&mut self, state: bool) -> Result<()> {
match self {
Connection::Serial(t) => t.set_dtr(state),
Connection::Tcp(_) | Connection::Udp(_) => {
Err(crate::error::Error::ConnectionFailed(
"DTR only supported on Serial connections".into(),
))
}
Connection::Tcp(_) | Connection::Udp(_) => Err(crate::error::Error::ConnectionFailed(
"DTR only supported on Serial connections".into(),
)),
}
}
pub fn set_rts(&mut self, state: bool) -> Result<()> {
match self {
Connection::Serial(t) => t.set_rts(state),
Connection::Tcp(_) | Connection::Udp(_) => {
Err(crate::error::Error::ConnectionFailed(
"RTS only supported on Serial connections".into(),
))
}
Connection::Tcp(_) | Connection::Udp(_) => Err(crate::error::Error::ConnectionFailed(
"RTS only supported on Serial connections".into(),
)),
}
}
}