[librsvg: 2/4] Remove OwnedPropertyBag; it is unused now
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/4] Remove OwnedPropertyBag; it is unused now
- Date: Sat, 4 May 2019 00:41:52 +0000 (UTC)
commit 1c01a95b92b161f6e4212de013679a977c99b388
Author: Federico Mena Quintero <federico gnome org>
Date: Fri May 3 19:08:59 2019 -0500
Remove OwnedPropertyBag; it is unused now
rsvg_internals/src/property_bag.rs | 25 +------------------------
rsvg_internals/src/structure.rs | 2 +-
2 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/rsvg_internals/src/property_bag.rs b/rsvg_internals/src/property_bag.rs
index 1f932558..27191795 100644
--- a/rsvg_internals/src/property_bag.rs
+++ b/rsvg_internals/src/property_bag.rs
@@ -1,7 +1,6 @@
use libc;
-use std::ffi::{CStr, CString};
-use std::ops::Deref;
+use std::ffi::CStr;
use std::slice;
use std::str::{self, FromStr};
@@ -9,8 +8,6 @@ use crate::attributes::Attribute;
pub struct PropertyBag<'a>(Vec<(Attribute, &'a CStr)>);
-pub struct OwnedPropertyBag(Vec<(Attribute, CString)>);
-
pub struct PropertyBagIter<'a>(slice::Iter<'a, (Attribute, &'a CStr)>);
trait Utf8CStrToStr {
@@ -76,26 +73,6 @@ impl<'a> PropertyBag<'a> {
PropertyBag(array)
}
- pub fn from_owned(owned: &OwnedPropertyBag) -> PropertyBag<'_> {
- let mut array = Vec::new();
-
- for &(a, ref v) in &owned.0 {
- array.push((a, v.deref()));
- }
-
- PropertyBag(array)
- }
-
- pub fn to_owned(&self) -> OwnedPropertyBag {
- let mut array = Vec::<(Attribute, CString)>::new();
-
- for &(a, v) in &self.0 {
- array.push((a, (*v).to_owned()));
- }
-
- OwnedPropertyBag(array)
- }
-
pub fn len(&self) -> usize {
self.0.len()
}
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index 41e47ae0..171e0fd1 100644
--- a/rsvg_internals/src/structure.rs
+++ b/rsvg_internals/src/structure.rs
@@ -15,7 +15,7 @@ use crate::length::*;
use crate::node::*;
use crate::parsers::{Parse, ParseValue};
use crate::properties::ComputedValues;
-use crate::property_bag::{OwnedPropertyBag, PropertyBag};
+use crate::property_bag::PropertyBag;
use crate::property_defs::Overflow;
use crate::rect::RectangleExt;
use crate::viewbox::*;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]