Move the impl of Source to the same file as the definition of the struct.

This commit is contained in:
Tom Alexander
2023-04-21 16:16:14 -04:00
parent d780981baf
commit 142bb09879
5 changed files with 74 additions and 77 deletions

View File

@@ -1,5 +1,6 @@
use super::object::Object;
use super::object::TextMarkup;
use super::source::Source;
#[derive(Debug)]
pub struct Paragraph<'s> {
@@ -28,3 +29,21 @@ impl<'s> Paragraph<'s> {
}
}
}
impl<'s> Source<'s> for Paragraph<'s> {
fn get_source(&'s self) -> &'s str {
self.source
}
}
impl<'s> Source<'s> for TableCell<'s> {
fn get_source(&'s self) -> &'s str {
self.source
}
}
impl<'s> Source<'s> for Comment<'s> {
fn get_source(&'s self) -> &'s str {
self.source
}
}