🎨 Return an option task from confirm_completion
This commit is contained in:
parent
55cc7bb868
commit
1371a20e58
4 changed files with 36 additions and 54 deletions
|
@ -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")?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue