Remove unnecessary scope
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
parent
08f7b0a422
commit
2b70da1661
@ -1135,7 +1135,6 @@ crate fn markdown_links(md: &str) -> Vec<(String, Option<Range<usize>>)> {
|
||||
let mut links = vec![];
|
||||
let mut shortcut_links = vec![];
|
||||
|
||||
{
|
||||
let locate = |s: &str| unsafe {
|
||||
let s_start = s.as_ptr();
|
||||
let s_end = s_start.add(s.len());
|
||||
@ -1156,8 +1155,7 @@ crate fn markdown_links(md: &str) -> Vec<(String, Option<Range<usize>>)> {
|
||||
shortcut_links.push((link.reference.to_owned(), locate(link.reference)));
|
||||
None
|
||||
};
|
||||
let p =
|
||||
Parser::new_with_broken_link_callback(md, opts(), Some(&mut push)).into_offset_iter();
|
||||
let p = Parser::new_with_broken_link_callback(md, opts(), Some(&mut push)).into_offset_iter();
|
||||
|
||||
// There's no need to thread an IdMap through to here because
|
||||
// the IDs generated aren't going to be emitted anywhere.
|
||||
@ -1173,7 +1171,6 @@ crate fn markdown_links(md: &str) -> Vec<(String, Option<Range<usize>>)> {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
links.append(&mut shortcut_links);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user