import error into scope of parse function
@@ -123,11 +123,13 @@ fn impl_parse(
let matching_values = infos.iter().map(|c| c.get_matched_value(global));
quote! {
- fn parse<N>(s: &str, bot_name: N) -> Result<Self, ParseError>
+ fn parse<N>(s: &str, bot_name: N) -> Result<Self, teloxide::utils::ParseError>
where
N: Into<String>
{
use std::str::FromStr;
+ use teloxide::utils::ParseError;
+
let mut words = s.splitn(2, ' ');
let mut splited = words.next().expect("First item will be always.").split('@');
let command_raw = splited.next().expect("First item will be always.");
