eculocate

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 25c46ace9b2116bf255c77c4455190f1002e8e3b
parent de25493840571f57e687f52debf2e8f596e70206
Author: Daniel Barlow <dan@telent.net>
Date:   Fri, 26 Dec 2025 00:15:49 +0000

rewrite name comparison to use label.to_string instead of eq

comparing labels does not seem to work as I would naively expect

Diffstat:
Mecu-esp32/src/wifi.rs | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ecu-esp32/src/wifi.rs b/ecu-esp32/src/wifi.rs @@ -5,6 +5,7 @@ use alloc::vec; use alloc::vec::Vec; use alloc::string::String; +use crate::alloc::string::ToString; use embassy_executor::Spawner; use embassy_net::{ @@ -182,9 +183,10 @@ impl DnsResource { } fn find<'a>(name: Label, ty: ResourceType, resources: &'a Vec<Self>) -> Vec<&'a Self> { - resources.into_iter().filter( - |r| (ty == ResourceType::Wildcard || r.ty == ty) && - name.eq(&Label::from(&(r.name[..]))) + let dotted_name = name.to_string(); + resources.into_iter().filter( |r| + ((ty == ResourceType::Wildcard) || (r.ty == ty)) && + dotted_name == r.name ).collect() } }