From e0ec5c115fce3cec7f894e21af40fa9b5d907e89 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Wed, 1 Nov 2023 00:49:22 -0400 Subject: [PATCH] Need a constant value for generic numbers. --- src/types/document.rs | 5 +++++ src/types/mod.rs | 1 + 2 files changed, 6 insertions(+) diff --git a/src/types/document.rs b/src/types/document.rs index ea1a9a6..a6e8217 100644 --- a/src/types/document.rs +++ b/src/types/document.rs @@ -6,6 +6,7 @@ use super::Object; use super::PostBlank; use super::StandardProperties; use super::Timestamp; +use crate::types::remove_trailing::RemoveTrailing; pub type PriorityCookie = u8; pub type HeadlineLevel = u16; @@ -62,6 +63,10 @@ impl<'s> StandardProperties<'s> for Document<'s> { } fn get_contents<'b>(&'b self) -> Option<&'s str> { + let post_blank = self.get_post_blank(); + let foo: RemoveTrailing<_, post_blank> = + RemoveTrailing::new(self.source.split_inclusive("\n")); + // self.source.split_inclusive("\n") todo!() } diff --git a/src/types/mod.rs b/src/types/mod.rs index e142dce..2653394 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -6,6 +6,7 @@ mod greater_element; mod lesser_element; mod macros; mod object; +mod remove_trailing; mod standard_properties; mod util; pub use affiliated_keyword::AffiliatedKeyword;