summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs1
-rw-r--r--src/sdf.rs2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 8f8859b..b8f8329 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,7 +1,6 @@
/*
@TODO:
- reload settings.txt when changed
-- strip ' ' and '\n' from *inside* string
- flash error on bad string (see @TODO(error handling))
- RnToRn functions (& add back in RToR)
- also add PerComponent(Box<RToR>,Box<RToR>,Box<RToR>) in R3ToR3
diff --git a/src/sdf.rs b/src/sdf.rs
index e84c2f0..929c324 100644
--- a/src/sdf.rs
+++ b/src/sdf.rs
@@ -67,7 +67,7 @@ fn encode_hex(data: &[u8]) -> String {
/// decode `data` from hexadecimal.
/// returns None if this isn't a valid hexadecimal string.
fn decode_hex(data: &str) -> Option<Vec<u8>> {
- let data = data.trim();
+ let data = data.replace(char::is_whitespace, "");
if data.len() % 2 != 0 {
return None;
}