aboutsummaryrefslogtreecommitdiff
path: root/src/client/context.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-10-01 21:59:33 +0200
committeracdenisSK <[email protected]>2017-10-01 22:14:23 +0200
commit1bf4d9cb9823dca8c4bb77147c66eac2d53f609f (patch)
treeba14ca714fa7bc1e6ba1d26f10e7c170bdf10ffa /src/client/context.rs
parentHave `ConnectionStage` derive Copy (diff)
downloadserenity-1bf4d9cb9823dca8c4bb77147c66eac2d53f609f.tar.xz
serenity-1bf4d9cb9823dca8c4bb77147c66eac2d53f609f.zip
`to_owned` -> `to_string`
Diffstat (limited to 'src/client/context.rs')
-rw-r--r--src/client/context.rs10
1 files changed, 5 insertions, 5 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,
};