diff --git a/.gitignore b/.gitignore index 1b71596..72e1e51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target/ -/.vscode/ \ No newline at end of file +/.vscode/ +.idea diff --git a/kalshi/src/auth.rs b/kalshi/src/auth.rs index 54c9095..4b7ea4b 100644 --- a/kalshi/src/auth.rs +++ b/kalshi/src/auth.rs @@ -20,12 +20,12 @@ impl<'a> Kalshi { /// ``` /// kalshi_instance.login("johndoe@example.com", "example_password").await?; /// ``` - pub async fn login(&mut self, user: &str, password: &str) -> Result<(), KalshiError> { - let login_url: &str = &format!("{}/login", self.base_url.to_string()); + pub async fn login(&mut self, user: String, password: String) -> Result<(), KalshiError> { + let login_url = format!("{}/login", self.base_url); let login_payload = LoginPayload { - email: user.to_string(), - password: password.to_string(), + email: user, + password, }; let result: LoginResponse = self