refactor: use allegedly more performant codium fix
This commit is contained in:
parent
8dd6edc60a
commit
eacc25f0b7
1 changed files with 4 additions and 3 deletions
|
@ -73,7 +73,8 @@ pub async fn subscribe_topics(
|
||||||
/// This function strips the '/SmartDashboard/' prefix from the topic name if
|
/// This function strips the '/SmartDashboard/' prefix from the topic name if
|
||||||
/// it is present. This allows easier data processing from the frontend.
|
/// it is present. This allows easier data processing from the frontend.
|
||||||
fn process_message(message: &mut MessageData) {
|
fn process_message(message: &mut MessageData) {
|
||||||
if let Some(stripped) = message.topic_name.strip_prefix("/SmartDashboard/") {
|
message.topic_name = message
|
||||||
message.topic_name = stripped.to_string();
|
.topic_name
|
||||||
}
|
.trim_start_matches("/SmartDashboard/")
|
||||||
|
.to_string();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue