my fork of dmp
Diffstat (limited to 'src/traits.rs')
-rw-r--r--src/traits.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/traits.rs b/src/traits.rs
index 02d0ee2..83b4f25 100644
--- a/src/traits.rs
+++ b/src/traits.rs
@@ -52,10 +52,18 @@ pub trait DType: Copy + Ord + Eq + Hash {
fn from_str(str: &str) -> Vec<Self>;
fn to_string(data: &[Self]) -> Result<String, crate::Error>;
- fn is_whitespace(self) -> bool { unimplemented!() }
- fn is_newline(self) -> bool { unimplemented!() }
- fn is_carriage(self) -> bool { unimplemented!() }
- fn is_alphanum(self) -> bool { unimplemented!() }
+ fn is_whitespace(self) -> bool {
+ unimplemented!()
+ }
+ fn is_newline(self) -> bool {
+ unimplemented!()
+ }
+ fn is_carriage(self) -> bool {
+ unimplemented!()
+ }
+ fn is_alphanum(self) -> bool {
+ unimplemented!()
+ }
fn is_linebreak_end(input: &[Self]) -> bool;
fn is_linebreak_start(input: &[Self]) -> bool;
@@ -114,7 +122,6 @@ impl DType for u8 {
|| input.starts_with(b"\n\n")
}
-
fn percent_encode(input: &[Self]) -> Vec<Self> {
percent_encoding::percent_encode(input, ENCODE_SET)
.collect::<String>()
@@ -122,7 +129,6 @@ impl DType for u8 {
.to_vec()
}
-
fn percent_decode(input: &[Self]) -> Vec<Self> {
percent_decode(input).collect()
}