diff options
| author | Zeyla Hellyer <[email protected]> | 2017-06-04 13:51:53 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-06-04 14:38:24 -0700 |
| commit | d66adb4375a2280800fd3b6484fd00da5b552789 (patch) | |
| tree | 268926d39f4bcaf5fe3f1f44cc85b83781623adb /src/model/channel/mod.rs | |
| parent | Remove a FQN usage in User::refresh (diff) | |
| download | serenity-d66adb4375a2280800fd3b6484fd00da5b552789.tar.xz serenity-d66adb4375a2280800fd3b6484fd00da5b552789.zip | |
Make http::AttachmentType only use borrowed values
With the way AttachmentType is meant to be used by `http::send_files`,
none of the values need to be moved, they only need to be borrowed.
Diffstat (limited to 'src/model/channel/mod.rs')
| -rw-r--r-- | src/model/channel/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs index 269b702..aed04ab 100644 --- a/src/model/channel/mod.rs +++ b/src/model/channel/mod.rs @@ -323,8 +323,8 @@ impl Channel { /// [Attach Files]: permissions/constant.ATTACH_FILES.html /// [Send Messages]: permissions/constant.SEND_MESSAGES.html #[inline] - pub fn send_files<F, T: Into<AttachmentType>>(&self, files: Vec<T>, f: F) -> Result<Message> - where F: FnOnce(CreateMessage) -> CreateMessage { + pub fn send_files<'a, F, T>(&self, files: Vec<T>, f: F) -> Result<Message> + where F: FnOnce(CreateMessage) -> CreateMessage, T: Into<AttachmentType<'a>> { self.id().send_files(files, f) } |