mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-31 21:48:53 -06:00
Integration: GPX attributes use decoded_and_normalized_value (deprecated method fails clippy)
This commit is contained in:
@@ -127,11 +127,15 @@ pub fn parse_gpx(s: &str) -> Result<Tracklog, GpxError> {
|
||||
for a in e.attributes().with_checks(false).flatten() {
|
||||
match local(a.key.as_ref()) {
|
||||
b"lat" => {
|
||||
let v = a.decode_and_unescape_value(reader.decoder()).map_err(|e| GpxError::Xml(e.to_string()))?;
|
||||
let v = a
|
||||
.decoded_and_normalized_value(quick_xml::XmlVersion::Implicit1_0, reader.decoder())
|
||||
.map_err(|e| GpxError::Xml(e.to_string()))?;
|
||||
p.lat = v.trim().parse().ok();
|
||||
}
|
||||
b"lon" => {
|
||||
let v = a.decode_and_unescape_value(reader.decoder()).map_err(|e| GpxError::Xml(e.to_string()))?;
|
||||
let v = a
|
||||
.decoded_and_normalized_value(quick_xml::XmlVersion::Implicit1_0, reader.decoder())
|
||||
.map_err(|e| GpxError::Xml(e.to_string()))?;
|
||||
p.lon = v.trim().parse().ok();
|
||||
}
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user