use crate::error::CustomError; use super::registry::Registry; #[derive(Debug)] pub(crate) struct ISrcBlock { pub(crate) lines: Vec, } impl ISrcBlock { pub(crate) async fn new<'b, 'parse>( registry: &'b mut Registry<'parse>, original: &'b organic::types::SrcBlock<'parse>, ) -> Result { let lines = original .contents .split_inclusive('\n') .map(|s| s.to_owned()) .collect(); Ok(ISrcBlock { lines }) } }