Switch to i32 for tracking bracket depth.
This commit is contained in:
@@ -109,7 +109,7 @@ fn key_suffix<'r, 's>(
|
||||
}
|
||||
|
||||
fn key_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<'_>| {
|
||||
_key_prefix_end(context, input, starting_bracket_depth)
|
||||
@@ -120,7 +120,7 @@ fn key_prefix_end(
|
||||
fn _key_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 {
|
||||
@@ -140,7 +140,7 @@ fn _key_prefix_end<'r, 's>(
|
||||
}
|
||||
|
||||
fn key_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<'_>| {
|
||||
_key_suffix_end(context, input, starting_bracket_depth)
|
||||
@@ -151,7 +151,7 @@ fn key_suffix_end(
|
||||
fn _key_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