🎨 Return an option task from confirm_completion

This commit is contained in:
Max Brunsfeld 2022-02-01 14:27:01 -08:00
parent 55cc7bb868
commit 1371a20e58
4 changed files with 36 additions and 54 deletions

View file

@ -12,7 +12,7 @@ type TabStop = SmallVec<[Range<usize>; 2]>;
impl Snippet {
pub fn parse(source: &str) -> Result<Self> {
let mut text = String::new();
let mut text = String::with_capacity(source.len());
let mut tabstops = BTreeMap::new();
parse_snippet(source, false, &mut text, &mut tabstops)
.context("failed to parse snippet")?;