zlubsen / dis-rs

Implementation of DIS in Rust
MIT License
14 stars 6 forks source link

CDIS-Gateway: Implement or remove use of uri config option #37

Open zlubsen opened 3 weeks ago

zlubsen commented 3 weeks ago
warning: field uri is never read --> cdis-gateway/src/config.rs:346:9 345 pub struct EndPointSpec { ------------ field in this struct 346 pub uri: String, ^^^
= note: `EndPointSpec` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
zlubsen commented 3 weeks ago

When creating an UdpEndpoint from the spec, we have the following two lines:

config.rs:149 let interface = value.interface.parse().unwrap_orelse(|| panic!("Cannot parse socket address {}", value.interface)); let address = value.interface.parse().unwrap_orelse(|| panic!("Cannot parse socket address {}", value.interface));

Both interface and address use the value.interface field. Address should refer to 'uri'.