mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
Use an owned String
instead of borrowed &str
for token in GetMe
request
This commit is contained in:
parent
9b78fb5b9a
commit
ce87928a90
1 changed files with 4 additions and 4 deletions
|
@ -5,12 +5,12 @@ use reqwest::r#async::multipart::Form;
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Constructor, PartialEq, Eq)]
|
#[derive(Debug, Constructor, PartialEq, Eq)]
|
||||||
pub struct GetMe<'a> {
|
pub struct GetMe {
|
||||||
token: &'a str,
|
token: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Request<User> for GetMe<'_> {
|
impl Request<User> for GetMe {
|
||||||
fn name(&self) -> &str { "getMe" }
|
fn name(&self) -> &str { "getMe" }
|
||||||
fn params(self) -> Option<Form> { None }
|
fn params(self) -> Option<Form> { None }
|
||||||
fn token(&self) -> &str { self.token }
|
fn token(&self) -> &str { &self.token }
|
||||||
}
|
}
|
Loading…
Reference in a new issue