Skip to content

Commit

Permalink
Change CreateCommand::{min_length, max_length} to take mut self (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrasnitski authored Jun 25, 2023
1 parent 4145d84 commit 56867af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder/create_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ impl CreateCommandOption {
/// Sets the minimum permitted length for this string option.
///
/// The value of `min_length` must be greater or equal to `0`.
pub fn min_length(&mut self, value: u16) -> &mut Self {
pub fn min_length(mut self, value: u16) -> Self {
self.0.min_length = Some(value);

self
Expand All @@ -265,7 +265,7 @@ impl CreateCommandOption {
/// Sets the maximum permitted length for this string option.
///
/// The value of `max_length` must be greater or equal to `1`.
pub fn max_length(&mut self, value: u16) -> &mut Self {
pub fn max_length(mut self, value: u16) -> Self {
self.0.max_length = Some(value);

self
Expand Down

0 comments on commit 56867af

Please sign in to comment.