Remove unnecessary map_err from main.rs.
This commit is contained in:
parent
c7d5c89a60
commit
27cf6c0462
@ -68,7 +68,7 @@ fn run_anonymous_parse<P: AsRef<str>>(org_contents: P) -> Result<(), Box<dyn std
|
||||
let org_contents = org_contents.as_ref();
|
||||
eprintln!("Using emacs version: {}", get_emacs_version()?.trim());
|
||||
eprintln!("Using org-mode version: {}", get_org_mode_version()?.trim());
|
||||
let rust_parsed = parse(org_contents).map_err(|e| e.to_string())?;
|
||||
let rust_parsed = parse(org_contents)?;
|
||||
let org_sexp = emacs_parse_anonymous_org_document(org_contents)?;
|
||||
let (_remaining, parsed_sexp) =
|
||||
sexp_with_padding(org_sexp.as_str()).map_err(|e| e.to_string())?;
|
||||
@ -93,7 +93,7 @@ fn run_anonymous_parse<P: AsRef<str>>(org_contents: P) -> Result<(), Box<dyn std
|
||||
eprintln!(
|
||||
"This program was built with compare disabled. Only parsing with organic, not comparing."
|
||||
);
|
||||
let rust_parsed = parse(org_contents.as_ref()).map_err(|e| e.to_string())?;
|
||||
let rust_parsed = parse(org_contents.as_ref())?;
|
||||
println!("{:#?}", rust_parsed);
|
||||
Ok(())
|
||||
}
|
||||
@ -106,7 +106,7 @@ fn run_parse_on_file<P: AsRef<Path>>(org_path: P) -> Result<(), Box<dyn std::err
|
||||
// TODO: This should take into account the original file path when parsing in Organic, not just in emacs.
|
||||
let org_contents = std::fs::read_to_string(org_path)?;
|
||||
let org_contents = org_contents.as_str();
|
||||
let rust_parsed = parse(org_contents).map_err(|e| e.to_string())?;
|
||||
let rust_parsed = parse(org_contents)?;
|
||||
let org_sexp = emacs_parse_file_org_document(org_path)?;
|
||||
let (_remaining, parsed_sexp) =
|
||||
sexp_with_padding(org_sexp.as_str()).map_err(|e| e.to_string())?;
|
||||
@ -135,7 +135,7 @@ fn run_parse_on_file<P: AsRef<Path>>(org_path: P) -> Result<(), Box<dyn std::err
|
||||
// TODO: This should take into account the original file path when parsing
|
||||
let org_contents = std::fs::read_to_string(org_path)?;
|
||||
let org_contents = org_contents.as_str();
|
||||
let rust_parsed = parse(org_contents).map_err(|e| e.to_string())?;
|
||||
let rust_parsed = parse(org_contents)?;
|
||||
println!("{:#?}", rust_parsed);
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user