aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-09 14:28:59 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-09 14:28:59 +0200
commit344c3db875056d4aec509f24fb2dbeaf7e2a14b6 (patch)
tree88210fc3caeadccc93abf699936f78d7e6fe1396 /src/parser.rs
parentcba78821ed13d5a92c74d092914fbad4c842f889 (diff)
downloadmarkdown-rs-344c3db875056d4aec509f24fb2dbeaf7e2a14b6.tar.gz
markdown-rs-344c3db875056d4aec509f24fb2dbeaf7e2a14b6.tar.bz2
markdown-rs-344c3db875056d4aec509f24fb2dbeaf7e2a14b6.zip
Refactor to pass more slices around
Diffstat (limited to '')
-rw-r--r--src/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 10c6e7a..e156e33 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -9,6 +9,6 @@ use crate::tokenizer::{as_codes, Code, Event};
pub fn parse(value: &str) -> (Vec<Event>, Vec<Code>) {
let codes = as_codes(value);
// To do: pass a reference to this around, and slices in the (back)feeding. Might be tough.
- let events = flow(codes.clone());
+ let events = flow(&codes);
(events, codes)
}