summaryrefslogtreecommitdiff
path: root/usvg/src/svgtree/parse.rs
diff options
context:
space:
mode:
Diffstat (limited to 'usvg/src/svgtree/parse.rs')
-rw-r--r--usvg/src/svgtree/parse.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/usvg/src/svgtree/parse.rs b/usvg/src/svgtree/parse.rs
index 2c58e7d..bcc8b0f 100644
--- a/usvg/src/svgtree/parse.rs
+++ b/usvg/src/svgtree/parse.rs
@@ -2,6 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+use std::rc::Rc;
use std::str::FromStr;
use std::collections::HashMap;
@@ -451,7 +452,7 @@ fn parse_svg_attribute(
AId::D => {
let segments = parse_path(value);
if segments.len() >= 2 {
- AttributeValue::Path(segments)
+ AttributeValue::Path(Rc::new(segments))
} else {
return Err(svgtypes::Error::InvalidValue);
}