diff --git a/src/compare/diff.rs b/src/compare/diff.rs index d471e02..97aa6a4 100644 --- a/src/compare/diff.rs +++ b/src/compare/diff.rs @@ -28,6 +28,7 @@ use crate::DynamicBlock; pub struct DiffResult { status: DiffStatus, name: String, + #[allow(dead_code)] message: Option, children: Vec, } diff --git a/src/compare/parse.rs b/src/compare/parse.rs index 03e5b52..79633a9 100644 --- a/src/compare/parse.rs +++ b/src/compare/parse.rs @@ -1,17 +1,6 @@ use std::path::Path; use std::process::Command; -use crate::compare::sexp::sexp; - -pub fn compare_parse_org_document<'a, C>(file_path: C) -> Result> -where - C: AsRef, -{ - let org_sexp = emacs_parse_org_document(file_path)?; - let parsed_sexp = sexp(org_sexp.as_str()).expect("Parse failure"); - todo!() -} - pub fn emacs_parse_org_document<'a, C>(file_path: C) -> Result> where C: AsRef, diff --git a/src/compare/sexp.rs b/src/compare/sexp.rs index da3bb39..e8ac1f4 100644 --- a/src/compare/sexp.rs +++ b/src/compare/sexp.rs @@ -27,7 +27,9 @@ pub enum Token<'s> { #[derive(Debug)] pub struct TextWithProperties<'s> { + #[allow(dead_code)] text: &'s str, + #[allow(dead_code)] properties: Vec>, } diff --git a/src/init_tracing.rs b/src/init_tracing.rs index 3a89c49..e82b1df 100644 --- a/src/init_tracing.rs +++ b/src/init_tracing.rs @@ -1,6 +1,6 @@ use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::util::SubscriberInitExt; -use tracing_subscriber::EnvFilter; +// use tracing_subscriber::EnvFilter; pub fn init_telemetry() -> Result<(), Box> { // let env_filter = EnvFilter::try_from_default_env().unwrap_or(EnvFilter::new("warn")); diff --git a/src/parser/list.rs b/src/parser/list.rs index 95abb3d..3266ca0 100644 --- a/src/parser/list.rs +++ b/src/parser/list.rs @@ -64,16 +64,19 @@ impl List { } } + #[allow(dead_code)] pub fn without_front(&self) -> List { List { head: self.head.as_ref().map(|node| node.parent.clone()).flatten(), } } + #[allow(dead_code)] pub fn get_data(&self) -> Option<&T> { self.head.as_ref().map(|rc_node| &rc_node.data) } + #[allow(dead_code)] pub fn is_empty(&self) -> bool { self.head.is_none() } @@ -92,6 +95,7 @@ impl List { } } + #[allow(dead_code)] pub fn iter_until<'a>(&'a self, other: &'a List) -> impl Iterator>> { NodeIterUntil { position: &self.head, @@ -99,6 +103,7 @@ impl List { } } + #[allow(dead_code)] pub fn into_iter_until<'a>(self, other: &'a List) -> impl Iterator + 'a { NodeIntoIterUntil { position: self, diff --git a/src/parser/parser_context.rs b/src/parser/parser_context.rs index c97f666..8737ade 100644 --- a/src/parser/parser_context.rs +++ b/src/parser/parser_context.rs @@ -28,6 +28,7 @@ impl<'r, 's> ContextTree<'r, 's> { } } + #[allow(dead_code)] pub fn ptr_eq<'x, 'y>(&self, other: &ContextTree<'x, 'y>) -> bool { self.tree.ptr_eq(&other.tree) } @@ -37,29 +38,10 @@ impl<'r, 's> ContextTree<'r, 's> { ContextTree { tree: new_list } } - pub fn pop_front(&mut self) -> (Option>, ContextTree<'r, 's>) { - let (popped_element, remaining) = self.tree.pop_front(); - (popped_element, ContextTree { tree: remaining }) - } - pub fn iter(&self) -> impl Iterator>>> { self.tree.iter() } - pub fn iter_until<'x: 'r>( - &'r self, - other: &'x ContextTree<'x, 's>, - ) -> impl Iterator>>> { - self.tree.iter_until(&other.tree) - } - - pub fn into_iter_until<'x: 'r>( - self, - other: &'x ContextTree<'x, 's>, - ) -> impl Iterator> { - self.tree.into_iter_until(&other.tree) - } - #[tracing::instrument(ret, level = "debug")] pub fn check_exit_matcher( &'r self, diff --git a/src/parser/util.rs b/src/parser/util.rs index cd6a44a..a0beb1f 100644 --- a/src/parser/util.rs +++ b/src/parser/util.rs @@ -22,6 +22,7 @@ pub const WORD_CONSTITUENT_CHARACTERS: &str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; /// Check if we are below a section of the given section type regardless of depth +#[allow(dead_code)] pub fn in_section<'r, 's, 'x>(context: Context<'r, 's>, section_name: &'x str) -> bool { for thing in context.iter() { match thing.get_data() {