mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Rename User -> UserInfo in examples/simple_dialogue
This commit is contained in:
parent
4a7c31fec7
commit
afb6677a1e
1 changed files with 5 additions and 5 deletions
|
@ -33,17 +33,17 @@ impl FavouriteMusic {
|
|||
}
|
||||
|
||||
// ============================================================================
|
||||
// [A user's data]
|
||||
// [A UserInfo's data]
|
||||
// ============================================================================
|
||||
|
||||
#[derive(Default)]
|
||||
struct User {
|
||||
struct UserInfo {
|
||||
full_name: Option<String>,
|
||||
age: Option<u8>,
|
||||
favourite_music: Option<FavouriteMusic>,
|
||||
}
|
||||
|
||||
impl Display for User {
|
||||
impl Display for UserInfo {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
|
@ -72,8 +72,8 @@ enum State {
|
|||
// [Control a dialogue]
|
||||
// ============================================================================
|
||||
|
||||
type Ctx = DialogueHandlerCtx<Message, State, User>;
|
||||
type Res = Result<DialogueStage<State, User>, RequestError>;
|
||||
type Ctx = DialogueHandlerCtx<Message, State, UserInfo>;
|
||||
type Res = Result<DialogueStage<State, UserInfo>, RequestError>;
|
||||
|
||||
async fn send_favourite_music_types(ctx: &Ctx) -> Result<(), RequestError> {
|
||||
ctx.answer("Good. Now choose your favourite music:")
|
||||
|
|
Loading…
Add table
Reference in a new issue