diff options
| author | Zeyla Hellyer <[email protected]> | 2017-02-28 11:43:53 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-02-28 11:43:53 -0800 |
| commit | 28743c8632458b79b472e3719d4754b57e116ad0 (patch) | |
| tree | 2c892dfbc7651577d4c576ad9d6c395e0523c61b /src/client/context.rs | |
| parent | Standardize message editing methods (diff) | |
| download | serenity-28743c8632458b79b472e3719d4754b57e116ad0.tar.xz serenity-28743c8632458b79b472e3719d4754b57e116ad0.zip | |
Pass by reference where possible
A lot of the `rest` methods took - for example a Map - by value, where
they could instead take a reference. While this only prevents one clone
in the library, user-land code should no longer need to clone maps when
using the `rest` module.
Diffstat (limited to 'src/client/context.rs')
| -rw-r--r-- | src/client/context.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/context.rs b/src/client/context.rs index 2954d2c..f46e351 100644 --- a/src/client/context.rs +++ b/src/client/context.rs @@ -106,7 +106,7 @@ impl Context { let edited = f(EditProfile(map)).0.build(); - rest::edit_profile(edited) + rest::edit_profile(&edited) } /// Sets the current user as being [`Online`]. This maintains the current |