[librsvg: 18/43] Remove unused parse_and_validate()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 18/43] Remove unused parse_and_validate()
- Date: Sat, 21 Dec 2019 02:31:00 +0000 (UTC)
commit d7e14d101fd569195e32db6bd6eb78163d41964c
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Dec 20 12:08:54 2019 -0600
Remove unused parse_and_validate()
rsvg_internals/src/parsers.rs | 20 --------------------
1 file changed, 20 deletions(-)
---
diff --git a/rsvg_internals/src/parsers.rs b/rsvg_internals/src/parsers.rs
index 28731b74..31adbd35 100644
--- a/rsvg_internals/src/parsers.rs
+++ b/rsvg_internals/src/parsers.rs
@@ -45,13 +45,6 @@ pub fn finite_f32(n: f32) -> Result<f32, ValueErrorKind> {
pub trait ParseValue<T: Parse> {
/// Parses a `value` string into a type `T`.
fn parse(&self, value: &str) -> Result<T, NodeError>;
-
- /// Parses a `value` string into a type `T` with an optional validation function.
- fn parse_and_validate<F: FnOnce(T) -> Result<T, ValueErrorKind>>(
- &self,
- value: &str,
- validate: F,
- ) -> Result<T, NodeError>;
}
impl<T: Parse> ParseValue<T> for QualName {
@@ -61,19 +54,6 @@ impl<T: Parse> ParseValue<T> for QualName {
T::parse(&mut parser).attribute(self.clone())
}
-
- fn parse_and_validate<F: FnOnce(T) -> Result<T, ValueErrorKind>>(
- &self,
- value: &str,
- validate: F,
- ) -> Result<T, NodeError> {
- let mut input = ParserInput::new(value);
- let mut parser = Parser::new(&mut input);
-
- T::parse(&mut parser)
- .and_then(validate)
- .attribute(self.clone())
- }
}
pub trait ParseValueToParseError<T: ParseToParseError> {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]