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/framework/standard/mod.rs | |
| parent | Have `ConnectionStage` derive Copy (diff) | |
| download | serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.tar.xz serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.zip | |
`to_owned` -> `to_string`
Diffstat (limited to 'src/framework/standard/mod.rs')
| -rw-r--r-- | src/framework/standard/mod.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs index 8b73a36..89f8968 100644 --- a/src/framework/standard/mod.rs +++ b/src/framework/standard/mod.rs @@ -518,9 +518,9 @@ impl StandardFramework { .contains(&message.author.id) { Some(DispatchError::BlockedUser) } else if self.configuration.disabled_commands.contains(to_check) { - Some(DispatchError::CommandDisabled(to_check.to_owned())) + Some(DispatchError::CommandDisabled(to_check.to_string())) } else if self.configuration.disabled_commands.contains(built) { - Some(DispatchError::CommandDisabled(built.to_owned())) + Some(DispatchError::CommandDisabled(built.to_string())) } else { if !command.allowed_roles.is_empty() { if let Some(guild) = message.guild() { @@ -550,7 +550,7 @@ impl StandardFramework { if all_passed { None } else { - Some(DispatchError::CheckFailed(command.to_owned())) + Some(DispatchError::CheckFailed(command.clone())) } } } @@ -601,7 +601,7 @@ impl StandardFramework { -> Result<(), CommandError>) -> Self { { let ungrouped = self.groups - .entry("Ungrouped".to_owned()) + .entry("Ungrouped".to_string()) .or_insert_with(|| Arc::new(CommandGroup::default())); if let Some(ref mut group) = Arc::get_mut(ungrouped) { @@ -631,7 +631,7 @@ impl StandardFramework { where F: FnOnce(CreateCommand) -> CreateCommand, S: Into<String> { { let ungrouped = self.groups - .entry("Ungrouped".to_owned()) + .entry("Ungrouped".to_string()) .or_insert_with(|| Arc::new(CommandGroup::default())); if let Some(ref mut group) = Arc::get_mut(ungrouped) { @@ -649,7 +649,7 @@ impl StandardFramework { for v in &cmd.aliases { group .commands - .insert(v.to_owned(), CommandOrAlias::Alias(name.clone())); + .insert(v.to_string(), CommandOrAlias::Alias(name.clone())); } } @@ -871,12 +871,12 @@ impl Framework for StandardFramework { let cmd = group.commands.get(&built); if let Some(&CommandOrAlias::Alias(ref points_to)) = cmd { - built = points_to.to_owned(); + built = points_to.to_string(); } let mut to_check = if let Some(ref prefix) = group.prefix { if built.starts_with(prefix) && command_length > prefix.len() + 1 { - built[(prefix.len() + 1)..].to_owned() + built[(prefix.len() + 1)..].to_string() } else { continue; } |