aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
authorMaiddog <[email protected]>2017-08-27 20:21:15 -0500
committeralex <[email protected]>2017-08-28 03:21:15 +0200
commit26919cf9aad1d7bc5f0f8042b4caf6bfcddbd7d8 (patch)
treeeeca288b07b225a6fe96d88a1abb80948a61d47c /src/framework
parentFix examples (#151) (diff)
downloadserenity-26919cf9aad1d7bc5f0f8042b4caf6bfcddbd7d8.tar.xz
serenity-26919cf9aad1d7bc5f0f8042b4caf6bfcddbd7d8.zip
Remove mut when not needed (#152)
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/standard/args.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/framework/standard/args.rs b/src/framework/standard/args.rs
index 87b3e37..f8882af 100644
--- a/src/framework/standard/args.rs
+++ b/src/framework/standard/args.rs
@@ -52,7 +52,7 @@ impl Args {
/// Like [`single`], but doesn't remove the element.
///
/// [`single`]: #method.single
- pub fn single_n<T: FromStr>(&mut self) -> Result<T>
+ pub fn single_n<T: FromStr>(&self) -> Result<T>
where T::Err: StdError + 'static {
if self.delimiter_split.is_empty() {
return Err(Error::Eos);
@@ -98,7 +98,7 @@ impl Args {
/// Like [`single_quoted`], but doesn't remove the element.
///
/// [`single_quoted`]: #method.single_quoted
- pub fn single_quoted_n<T: FromStr>(&mut self) -> Result<T>
+ pub fn single_quoted_n<T: FromStr>(&self) -> Result<T>
where T::Err: StdError + 'static {
parse_quotes(&self.delimiter_split.get(0).ok_or(Error::Eos)?)
.remove(0)