[librsvg] length: remove recently add FromStr impl
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] length: remove recently add FromStr impl
- Date: Wed, 28 Mar 2018 20:18:47 +0000 (UTC)
commit 739850436da2bbaf5971b080795b16b441daef95
Author: Paolo Borelli <pborelli gnome org>
Date: Wed Mar 28 22:15:41 2018 +0200
length: remove recently add FromStr impl
It is not needed anymore and it is questionable since it assumes
that LengthDir is Both
rsvg_internals/src/length.rs | 9 ---------
1 file changed, 9 deletions(-)
---
diff --git a/rsvg_internals/src/length.rs b/rsvg_internals/src/length.rs
index 953fc2b0..50a38fa7 100644
--- a/rsvg_internals/src/length.rs
+++ b/rsvg_internals/src/length.rs
@@ -6,7 +6,6 @@ use regex::Regex;
use std::f64::consts::*;
use std::ptr;
-use std::str::FromStr;
use drawing_ctx;
use drawing_ctx::RsvgDrawingCtx;
@@ -139,14 +138,6 @@ impl Parse for RsvgLength {
}
}
-impl FromStr for RsvgLength {
- type Err = AttributeError;
-
- fn from_str(s: &str) -> Result<RsvgLength, AttributeError> {
- RsvgLength::parse(s, LengthDir::Both)
- }
-}
-
impl RsvgLength {
pub fn new(l: f64, unit: LengthUnit, dir: LengthDir) -> RsvgLength {
RsvgLength {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]