mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Cow::to_string()
-> &*Cow
This commit is contained in:
parent
bdbc226777
commit
ddefd9e8a6
1 changed files with 3 additions and 4 deletions
|
@ -25,7 +25,7 @@ impl Bot {
|
|||
Client::builder()
|
||||
.proxy(
|
||||
reqwest::Proxy::all(
|
||||
&proxy.to_string_lossy().to_string(),
|
||||
&*proxy.to_string_lossy(),
|
||||
)
|
||||
.expect("creating reqwest::Proxy"),
|
||||
)
|
||||
|
@ -45,10 +45,9 @@ impl Bot {
|
|||
/// [`reqwest::Client`]: https://docs.rs/reqwest/0.10.1/reqwest/struct.Client.html
|
||||
pub fn from_env_with_client(client: Client) -> Arc<Self> {
|
||||
Self::with_client(
|
||||
&std::env::var_os("TELOXIDE_TOKEN")
|
||||
&*std::env::var_os("TELOXIDE_TOKEN")
|
||||
.expect("Cannot get the TELOXIDE_TOKEN env variable")
|
||||
.to_string_lossy()
|
||||
.to_string(),
|
||||
.to_string_lossy(),
|
||||
client,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue