diff options
| author | Perry Fraser <[email protected]> | 2018-10-01 16:38:07 -0400 |
|---|---|---|
| committer | zeyla <[email protected]> | 2018-10-01 13:38:07 -0700 |
| commit | 9865d9ccd727a7f6c5c9a6094b87af0f6353831b (patch) | |
| tree | b9d13d1ff517347da19d198b257481fffbbb68db /src/framework | |
| parent | Change DOS line endings to UNIX line endings (diff) | |
| download | serenity-9865d9ccd727a7f6c5c9a6094b87af0f6353831b.tar.xz serenity-9865d9ccd727a7f6c5c9a6094b87af0f6353831b.zip | |
A bunch of typo fixes (#404)
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/standard/command.rs | 6 | ||||
| -rw-r--r-- | src/framework/standard/configuration.rs | 4 | ||||
| -rw-r--r-- | src/framework/standard/create_command.rs | 8 | ||||
| -rw-r--r-- | src/framework/standard/create_help_command.rs | 6 | ||||
| -rw-r--r-- | src/framework/standard/help_commands.rs | 8 | ||||
| -rw-r--r-- | src/framework/standard/mod.rs | 4 |
6 files changed, 18 insertions, 18 deletions
diff --git a/src/framework/standard/command.rs b/src/framework/standard/command.rs index 2b1149e..6f4440f 100644 --- a/src/framework/standard/command.rs +++ b/src/framework/standard/command.rs @@ -81,7 +81,7 @@ impl fmt::Debug for CommandOrAlias { #[derive(Clone, Debug)] pub struct Error(pub String); -// TODO: Have seperate `From<(&)String>` and `From<&str>` impls via specialization +// TODO: Have separate `From<(&)String>` and `From<&str>` impls via specialization impl<D: fmt::Display> From<D> for Error { fn from(d: D) -> Self { Error(d.to_string()) @@ -141,7 +141,7 @@ pub struct CommandOptions { pub example: Option<String>, /// Command usage schema, used by other commands. pub usage: Option<String>, - /// Minumum amount of arguments that should be passed. + /// Minimum amount of arguments that should be passed. pub min_args: Option<i32>, /// Maximum amount of arguments that can be passed. pub max_args: Option<i32>, @@ -216,7 +216,7 @@ pub struct HelpOptions { pub wrong_channel: HelpBehaviour, /// Colour help-embed will use upon encountering an error. pub embed_error_colour: Colour, - /// Colour help-embed will use if no error occured. + /// Colour help-embed will use if no error occurred. pub embed_success_colour: Colour, /// If not 0, help will check whether a command is similar to searched named. pub max_levenshtein_distance: usize, diff --git a/src/framework/standard/configuration.rs b/src/framework/standard/configuration.rs index 795493d..c19b1dd 100644 --- a/src/framework/standard/configuration.rs +++ b/src/framework/standard/configuration.rs @@ -448,7 +448,7 @@ impl Configuration { /// /// # Examples /// - /// Have the args be seperated by a comma and a space: + /// Have the args be separated by a comma and a space: /// /// ```rust,no_run /// # use serenity::prelude::*; @@ -475,7 +475,7 @@ impl Configuration { /// /// # Examples /// - /// Have the args be seperated by a comma and a space; and a regular space: + /// Have the args be separated by a comma and a space; and a regular space: /// /// ```rust,no_run /// # use serenity::prelude::*; diff --git a/src/framework/standard/create_command.rs b/src/framework/standard/create_command.rs index a769d4c..200f9f7 100644 --- a/src/framework/standard/create_command.rs +++ b/src/framework/standard/create_command.rs @@ -189,7 +189,7 @@ impl CreateCommand { self } - /// Minumum amount of arguments that should be passed. + /// Minimum amount of arguments that should be passed. pub fn min_args(mut self, min_args: i32) -> Self { self.0.min_args = Some(min_args); @@ -236,7 +236,7 @@ impl CreateCommand { /// Sets an initialise middleware to be called upon the command's actual registration. /// - /// This is similiar to implementing the `init` function on `Command`. + /// This is similar to implementing the `init` function on `Command`. pub fn init<F: Fn() + Send + Sync + 'static>(mut self, f: F) -> Self { self.2.init = Some(Arc::new(f)); @@ -245,7 +245,7 @@ impl CreateCommand { /// Sets a before middleware to be called before the command's execution. /// - /// This is similiar to implementing the `before` function on `Command`. + /// This is similar to implementing the `before` function on `Command`. pub fn before<F: Send + Sync + 'static>(mut self, f: F) -> Self where F: Fn(&mut Context, &Message) -> bool { self.2.before = Some(Arc::new(f)); @@ -255,7 +255,7 @@ impl CreateCommand { /// Sets an after middleware to be called after the command's execution. /// - /// This is similiar to implementing the `after` function on `Command`. + /// This is similar to implementing the `after` function on `Command`. pub fn after<F: Send + Sync + 'static>(mut self, f: F) -> Self where F: Fn(&mut Context, &Message, &Result<(), CommandError>) { self.2.after = Some(Arc::new(f)); diff --git a/src/framework/standard/create_help_command.rs b/src/framework/standard/create_help_command.rs index b8eb57a..c05cb32 100644 --- a/src/framework/standard/create_help_command.rs +++ b/src/framework/standard/create_help_command.rs @@ -126,7 +126,7 @@ impl CreateHelpCommand { self } - /// Sets how the group-prexix shall be labeled. + /// Sets how the group-prefix shall be labeled. pub fn group_prefix(mut self, text: &str) -> Self { self.0.group_prefix = text.to_string(); @@ -204,14 +204,14 @@ impl CreateHelpCommand { self } - /// Sets the colour for the embed if no error occured. + /// Sets the colour for the embed if no error occurred. pub fn embed_success_colour(mut self, colour: Colour) -> Self { self.0.embed_success_colour = colour; self } - /// Sets the colour for the embed if an error occured. + /// Sets the colour for the embed if an error occurred. pub fn embed_error_colour(mut self, colour: Colour) -> Self { self.0.embed_error_colour = colour; diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs index 94f49e9..94c9127 100644 --- a/src/framework/standard/help_commands.rs +++ b/src/framework/standard/help_commands.rs @@ -112,8 +112,8 @@ impl Suggestions { &self.0 } - /// Concats names of suggestions with a given `seperator`. - fn join(&self, seperator: &str) -> String { + /// Concats names of suggestions with a given `separator`. + fn join(&self, separator: &str) -> String { let mut iter = self.as_vec().iter(); let first_iter_element = match iter.next() { @@ -122,12 +122,12 @@ impl Suggestions { }; let size = self.as_vec().iter().fold(0, |total_size, size| total_size + size.name.len()); - let byte_len_of_sep = self.as_vec().len().checked_sub(1).unwrap_or(0) * seperator.len(); + let byte_len_of_sep = self.as_vec().len().checked_sub(1).unwrap_or(0) * separator.len(); let mut result = String::with_capacity(size + byte_len_of_sep); result.push_str(first_iter_element.name.borrow()); for element in iter { - result.push_str(&*seperator); + result.push_str(&*separator); result.push_str(element.name.borrow()); } diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs index aa32d11..7e99a0f 100644 --- a/src/framework/standard/mod.rs +++ b/src/framework/standard/mod.rs @@ -951,7 +951,7 @@ impl StandardFramework { /// Sets what code should be executed when a user sends `(prefix)help`. /// - /// If a command named `help` was set with [`command`], then this takes precendence first. + /// If a command named `help` was set with [`command`], then this takes precedence first. /// /// [`command`]: #method.command pub fn help(mut self, f: HelpFunction) -> Self { @@ -1238,7 +1238,7 @@ pub fn has_correct_roles(cmd: &Arc<CommandOptions>, guild: &Guild, member: &Memb /// The command can't be used in the current channel (as in `DM only` or `guild only`). #[derive(PartialEq, Debug)] pub enum HelpBehaviour { - /// Strikes a command by applying `~~{comand_name}~~`. + /// Strikes a command by applying `~~{command_name}~~`. Strike, /// Does not list a command in the help-menu. Hide, |