mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-11-15 07:07:07 +00:00
replace deprecated method
This commit is contained in:
1 parent
0e2a5a39df
commit
8ef3eca819
1 file changed
+2
-2
@@ -3,7 +3,7 @@ use crate::{
|
||||
TrackpointCategories, TrackpointChunk, Waypoint, WaypointChunk, distance,
|
||||
};
|
||||
use chrono::DateTime;
|
||||
use quick_xml::Error;
|
||||
use quick_xml::{Error, XmlVersion};
|
||||
use quick_xml::escape::resolve_predefined_entity;
|
||||
use quick_xml::events::Event;
|
||||
use quick_xml::events::attributes::{Attribute, Attributes};
|
||||
@@ -324,7 +324,7 @@ fn apply_text(
|
||||
/// The text of an attribute, without its escaping (`&` is `&`), which is written back when the
|
||||
/// file is. As it is in the file if it cannot be read.
|
||||
fn attribute_text(attr: &Attribute<'_>) -> String {
|
||||
attr.unescape_value()
|
||||
attr.normalized_value(XmlVersion::Implicit1_0)
|
||||
.map_or_else(|_| attr.value.to_string(), |text| text.into_owned())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user