aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-12-06 13:46:57 +0100
committeracdenisSK <[email protected]>2017-12-06 13:46:57 +0100
commitd45d19d8437bdc69048c369b2ed1e6cb27196a09 (patch)
tree430555544a054c82ee62f8d9e38616d9f1da437c /src
parentUse `AsRef` instead of just `&MessageId` (diff)
downloadserenity-d45d19d8437bdc69048c369b2ed1e6cb27196a09.tar.xz
serenity-d45d19d8437bdc69048c369b2ed1e6cb27196a09.zip
Make the comment for the `AsRef` impl more clear
Diffstat (limited to 'src')
-rw-r--r--src/model/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/model/mod.rs b/src/model/mod.rs
index 5d47ccb..83ecafa 100644
--- a/src/model/mod.rs
+++ b/src/model/mod.rs
@@ -62,7 +62,9 @@ macro_rules! id_u64 {
}
}
- // This is a hack so that functions can accept `IntoIterator<Item=IdType>`, and or `IntoIterator<Item=&IdType>`
+ // This is a hack so functions can accept iterators that either:
+ // 1. return the id itself (e.g: `MessageId`)
+ // 2. return a reference to it (`&MessageId`).
impl AsRef<$name> for $name {
fn as_ref(&self) -> &Self {
self