aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-10-01 21:59:33 +0200
committerZeyla Hellyer <[email protected]>2017-10-09 15:46:37 -0700
commit0ce8be869eeb2eb700e22f71b2e00872cc96a500 (patch)
tree03dd981bc04ba8475333d057705820c3320e3a97 /src/client
parentHave `ConnectionStage` derive Copy (diff)
downloadserenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.tar.xz
serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.zip
`to_owned` -> `to_string`
Diffstat (limited to 'src/client')
-rw-r--r--src/client/context.rs10
-rw-r--r--src/client/mod.rs2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/client/context.rs b/src/client/context.rs
index 31eeca5..2288f28 100644
--- a/src/client/context.rs
+++ b/src/client/context.rs
@@ -85,18 +85,18 @@ impl Context {
{
let cache = CACHE.read().unwrap();
- map.insert("username".to_owned(), Value::String(cache.user.name.clone()));
+ map.insert("username".to_string(), Value::String(cache.user.name.clone()));
if let Some(email) = cache.user.email.as_ref() {
- map.insert("email".to_owned(), Value::String(email.clone()));
+ map.insert("email".to_string(), Value::String(email.clone()));
}
} else {
let user = http::get_current_user()?;
- map.insert("username".to_owned(), Value::String(user.name.clone()));
+ map.insert("username".to_string(), Value::String(user.name.clone()));
if let Some(email) = user.email.as_ref() {
- map.insert("email".to_owned(), Value::String(email.clone()));
+ map.insert("email".to_string(), Value::String(email.clone()));
}
}
}
@@ -328,7 +328,7 @@ impl Context {
pub fn set_game_name(&self, game_name: &str) {
let game = Game {
kind: GameType::Playing,
- name: game_name.to_owned(),
+ name: game_name.to_string(),
url: None,
};
diff --git a/src/client/mod.rs b/src/client/mod.rs
index f497f2c..d1de13e 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -279,7 +279,7 @@ impl<H: EventHandler + Send + Sync + 'static> Client<H> {
/// ```
pub fn new(token: &str, handler: H) -> Self {
let token = if token.starts_with("Bot ") {
- token.to_owned()
+ token.to_string()
} else {
format!("Bot {}", token)
};