···199199 // If the Gemtext line starts with an "=" ("=>"), it is a link line,
200200 // so splitting it up should be easy enough.
201201 let line = line.get(2..).unwrap_or("");
202202- let mut split = line
203203- .split_whitespace()
204204- .map(String::from)
205205- .collect::<Vec<String>>()
206206- .into_iter();
202202+ let mut split = line.split_whitespace();
207203208204 nodes.push(Node::Link {
209209- to: split.next().unwrap_or_default(),
205205+ to: split.next().unwrap_or_default().to_string(),
210206 text: {
211211- let rest = split.collect::<Vec<String>>().join(" ");
207207+ let rest: Vec<&str> = split.collect();
212208213213- if rest.is_empty() { None } else { Some(rest) }
209209+ if rest.is_empty() { None } else { Some(rest.join(" ")) }
214210 },
215211 });
216212