diff options
| author | acdenisSK <[email protected]> | 2017-10-01 21:59:33 +0200 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-10-09 15:46:37 -0700 |
| commit | 0ce8be869eeb2eb700e22f71b2e00872cc96a500 (patch) | |
| tree | 03dd981bc04ba8475333d057705820c3320e3a97 /src/model/channel | |
| parent | Have `ConnectionStage` derive Copy (diff) | |
| download | serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.tar.xz serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.zip | |
`to_owned` -> `to_string`
Diffstat (limited to 'src/model/channel')
| -rw-r--r-- | src/model/channel/channel_category.rs | 8 | ||||
| -rw-r--r-- | src/model/channel/guild_channel.rs | 8 | ||||
| -rw-r--r-- | src/model/channel/message.rs | 2 | ||||
| -rw-r--r-- | src/model/channel/reaction.rs | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/model/channel/channel_category.rs b/src/model/channel/channel_category.rs index 50df35e..f567cee 100644 --- a/src/model/channel/channel_category.rs +++ b/src/model/channel/channel_category.rs @@ -94,14 +94,14 @@ impl ChannelCategory { } let mut map = Map::new(); - map.insert("name".to_owned(), Value::String(self.name.clone())); + map.insert("name".to_string(), Value::String(self.name.clone())); map.insert( - "position".to_owned(), + "position".to_string(), Value::Number(Number::from(self.position)), ); map.insert( - "type".to_owned(), - Value::String(self.kind.name().to_owned()), + "type".to_string(), + Value::String(self.kind.name().to_string()), ); let edited = f(EditChannel(map)).0; diff --git a/src/model/channel/guild_channel.rs b/src/model/channel/guild_channel.rs index a6bc597..6cd3b72 100644 --- a/src/model/channel/guild_channel.rs +++ b/src/model/channel/guild_channel.rs @@ -313,14 +313,14 @@ impl GuildChannel { } let mut map = Map::new(); - map.insert("name".to_owned(), Value::String(self.name.clone())); + map.insert("name".to_string(), Value::String(self.name.clone())); map.insert( - "position".to_owned(), + "position".to_string(), Value::Number(Number::from(self.position)), ); map.insert( - "type".to_owned(), - Value::String(self.kind.name().to_owned()), + "type".to_string(), + Value::String(self.kind.name().to_string()), ); let edited = f(EditChannel(map)).0; diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs index 7b94540..55f61ba 100644 --- a/src/model/channel/message.rs +++ b/src/model/channel/message.rs @@ -257,7 +257,7 @@ impl Message { self.content = if chosen.contains("$user") { chosen.replace("$user", &self.author.mention()) } else { - chosen.to_owned() + chosen.to_string() }; }, _ => {}, diff --git a/src/model/channel/reaction.rs b/src/model/channel/reaction.rs index 2420ba7..8edc2e9 100644 --- a/src/model/channel/reaction.rs +++ b/src/model/channel/reaction.rs @@ -274,7 +274,7 @@ impl<'a> From<&'a str> for ReactionType { /// /// foo("🍎"); /// ``` - fn from(unicode: &str) -> ReactionType { ReactionType::Unicode(unicode.to_owned()) } + fn from(unicode: &str) -> ReactionType { ReactionType::Unicode(unicode.to_string()) } } impl Display for ReactionType { |