Fixing more errors.

This commit is contained in:
Tom Alexander
2023-09-03 00:27:50 -04:00
parent 15e8d1ab77
commit b54c6d366c
7 changed files with 118 additions and 72 deletions

View File

@@ -28,7 +28,7 @@ pub const WORD_CONSTITUENT_CHARACTERS: &str =
#[allow(dead_code)]
pub fn in_section<'r, 's, 'x>(context: RefContext<'_, 'r, 's>, section_name: &'x str) -> bool {
for thing in context.iter() {
match thing.get_data() {
match thing {
ContextElement::Context(name) if *name == section_name => return true,
_ => {}
}
@@ -42,7 +42,7 @@ pub fn immediate_in_section<'r, 's, 'x>(
section_name: &'x str,
) -> bool {
for thing in context.iter() {
match thing.get_data() {
match thing {
ContextElement::Context(name) if *name == section_name => return true,
ContextElement::Context(name) if *name != section_name => return false,
_ => {}