XZ6Z2D6H7NPJASKMEWI7H6ALRJBH3GHFNHL67PAXQZM3N36W554AC
RTDVYLFT3PRNC4F4TWU47YFMLQPXR65CAAB6IVS7FIY2EB7HJGJQC
JBZGFYVOKR3X2GH25SOOW3X7RKY6ZACESYFF5NO26PJFUP3XGXUAC
5II6T7YETYWUIKUMNJIYFUOQHCA26N2YVJDSHLMNO2GR62MP2ORQC
use nom::{error::Error, Finish};
use nom::{error::Error, Finish, IResult};
fn handle<I: ToOwned + ?Sized, O>(res: IResult<&I, O>) -> Result<O, Error<I::Owned>> { match res.finish() { Ok((_, res)) => Ok(res), Err(Error { input, code }) => Err({ let input = input.to_owned(); Error { input, code } }), } }
fn handle<I: ToOwned + ?Sized, O>(res: IResult<&I, O>) -> Result<O, Error<I::Owned>> {
match res.finish() {
Ok((_, res)) => Ok(res),
Err(Error { input, code }) => Err({
let input = input.to_owned();
Error { input, code }
}),
}
match $name::parse::$name(bytes).finish() { Ok((_, res)) => Ok(res), Err(Error { input, code }) => Err({ let input = input.to_owned(); Error { input, code } }) }
match $name::parse::$name(bytes).finish() {
})
handle($name::parse::$name(bytes))
match gemtext::parse::document(input).finish() { Ok((_, b)) => Ok(b), Err(Error { input, code }) => Err({ let input = input.to_string(); Error { input, code } }), }
match gemtext::parse::document(input).finish() {
Ok((_, b)) => Ok(b),
let input = input.to_string();
handle(gemtext::parse::document(input))