Continue removing MyError.
This commit is contained in:
@@ -101,7 +101,7 @@ pub fn parse_file_with_settings<'g, 's, P: AsRef<Path>>(
|
||||
/// This will not prevent additional settings from being learned during parsing, for example when encountering a "#+TODO".
|
||||
#[allow(dead_code)]
|
||||
fn document<'s>(context: RefContext<'_, '_, '_, 's>, input: &'s str) -> Res<&'s str, Document<'s>> {
|
||||
let (remaining, doc) = document_org_source(context, input.into()).map_err(convert_error)?;
|
||||
let (remaining, doc) = document_org_source(context, input.into())?;
|
||||
Ok((Into::<&str>::into(remaining), doc))
|
||||
}
|
||||
|
||||
@@ -132,9 +132,9 @@ fn document_org_source<'b, 'g, 'r, 's>(
|
||||
let (_, setup_file_settings) =
|
||||
scan_for_in_buffer_settings(setup_file.into()).map_err(|err| {
|
||||
eprintln!("{}", err);
|
||||
nom::Err::Error(CustomError::MyError(MyError(
|
||||
nom::Err::Error(CustomError::Static(
|
||||
"TODO: make this take an owned string so I can dump err.to_string() into it.",
|
||||
)))
|
||||
))
|
||||
})?;
|
||||
final_settings.extend(setup_file_settings);
|
||||
}
|
||||
@@ -142,9 +142,9 @@ fn document_org_source<'b, 'g, 'r, 's>(
|
||||
let new_settings = apply_in_buffer_settings(final_settings, context.get_global_settings())
|
||||
.map_err(|err| {
|
||||
eprintln!("{}", err);
|
||||
nom::Err::Error(CustomError::MyError(MyError(
|
||||
nom::Err::Error(CustomError::Static(
|
||||
"TODO: make this take an owned string so I can dump err.to_string() into it.",
|
||||
)))
|
||||
))
|
||||
})?;
|
||||
let new_context = context.with_global_settings(&new_settings);
|
||||
let context = &new_context;
|
||||
|
||||
Reference in New Issue
Block a user