aboutsummaryrefslogtreecommitdiffstats
path: root/src/content
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/content
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/content/flow.rs2
-rw-r--r--src/content/string.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/content/flow.rs b/src/content/flow.rs
index ac987e1..693ffb5 100644
--- a/src/content/flow.rs
+++ b/src/content/flow.rs
@@ -32,7 +32,7 @@ use crate::util::get_span;
/// Turn `codes` as the flow content type into events.
// To do: remove this `allow` when all the content types are glued together.
#[allow(dead_code)]
-pub fn flow(codes: Vec<Code>) -> Vec<Event> {
+pub fn flow(codes: &[Code]) -> Vec<Event> {
let mut tokenizer = Tokenizer::new();
let (state, remainder) = tokenizer.feed(codes, Box::new(start), true);
diff --git a/src/content/string.rs b/src/content/string.rs
index a8a81b2..1239a36 100644
--- a/src/content/string.rs
+++ b/src/content/string.rs
@@ -18,7 +18,7 @@ use crate::tokenizer::{Code, Event, State, StateFnResult, TokenType, Tokenizer};
/// Turn `codes` as the string content type into events.
// To do: remove this `allow` when all the content types are glued together.
#[allow(dead_code)]
-pub fn string(codes: Vec<Code>) -> Vec<Event> {
+pub fn string(codes: &[Code]) -> Vec<Event> {
let mut tokenizer = Tokenizer::new();
let (state, remainder) = tokenizer.feed(codes, Box::new(before), true);