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