diff options
Diffstat (limited to 'rust/src/main.rs')
-rw-r--r-- | rust/src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rust/src/main.rs b/rust/src/main.rs index 6e10938..5a50f3b 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -18,6 +18,8 @@ use unicode_width::UnicodeWidthChar; use crate::editor::Editor; use crate::error::IntoIOError; +mod auth; +mod bel; mod editor; mod error; @@ -537,8 +539,10 @@ async fn async_main() -> io::Result<()> { let addr = ("127.0.0.1", 29538); let (conn, pushchan) = Connection::connect(connection::Type::Plain, addr).await?; - let user = Word::try_from(String::from("tom")).unwrap(); - let pass = Line::try_from(String::from("kaas")).unwrap(); + let (user, pass) = auth::get_auth_info()?; + + let user = Word::try_from(user.to_string()).unwrap(); + let pass = Line::try_from(pass.to_string()).unwrap(); send_command(&conn, Command::Register { username: user.clone(), password: pass.clone() }).await?; |