diff options
| author | acdenisSK <[email protected]> | 2017-10-01 21:59:33 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-10-01 22:14:23 +0200 |
| commit | 1bf4d9cb9823dca8c4bb77147c66eac2d53f609f (patch) | |
| tree | ba14ca714fa7bc1e6ba1d26f10e7c170bdf10ffa /src/framework/standard/mod.rs | |
| parent | Have `ConnectionStage` derive Copy (diff) | |
| download | serenity-1bf4d9cb9823dca8c4bb77147c66eac2d53f609f.tar.xz serenity-1bf4d9cb9823dca8c4bb77147c66eac2d53f609f.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 ec45a95..92572dd 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 { 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) { @@ -633,7 +633,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) { @@ -651,7 +651,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())); } } @@ -873,12 +873,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; } |