Switch to i32 for tracking bracket depth.
This commit is contained in:
@@ -102,7 +102,7 @@ fn global_prefix<'r, 's>(
|
||||
}
|
||||
|
||||
fn global_prefix_end(
|
||||
starting_bracket_depth: isize,
|
||||
starting_bracket_depth: i32,
|
||||
) -> impl for<'r, 's> Fn(Context<'r, 's>, OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
move |context: Context, input: OrgSource<'_>| {
|
||||
_global_prefix_end(context, input, starting_bracket_depth)
|
||||
@@ -113,7 +113,7 @@ fn global_prefix_end(
|
||||
fn _global_prefix_end<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
starting_bracket_depth: isize,
|
||||
starting_bracket_depth: i32,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
let current_depth = input.get_bracket_depth() - starting_bracket_depth;
|
||||
if current_depth < 0 {
|
||||
@@ -154,7 +154,7 @@ fn global_suffix<'r, 's>(
|
||||
}
|
||||
|
||||
fn global_suffix_end(
|
||||
starting_bracket_depth: isize,
|
||||
starting_bracket_depth: i32,
|
||||
) -> impl for<'r, 's> Fn(Context<'r, 's>, OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
move |context: Context, input: OrgSource<'_>| {
|
||||
_global_suffix_end(context, input, starting_bracket_depth)
|
||||
@@ -165,7 +165,7 @@ fn global_suffix_end(
|
||||
fn _global_suffix_end<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
starting_bracket_depth: isize,
|
||||
starting_bracket_depth: i32,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
let current_depth = input.get_bracket_depth() - starting_bracket_depth;
|
||||
if current_depth < 0 {
|
||||
|
||||
Reference in New Issue
Block a user