diff options
| author | Zeyla Hellyer <[email protected]> | 2017-09-21 17:29:10 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-09-21 17:29:10 -0700 |
| commit | 092f288fdd22ae39b019e61a6f12420b6ca3b67c (patch) | |
| tree | 6d8863cc859945457dc6c4b111017fa21ca8103f /src/model/user.rs | |
| parent | Remove tokio usage (diff) | |
| download | serenity-092f288fdd22ae39b019e61a6f12420b6ca3b67c.tar.xz serenity-092f288fdd22ae39b019e61a6f12420b6ca3b67c.zip | |
Update bitflags, other dependencies
Bitflags changed its macro codegen from creating constants to associated
constants on structs.
Upgrade path:
Update code from:
```rust
use serenity::model::permissions::{ADD_REACTIONS, MANAGE_MESSAGES};
foo(vec![ADD_REACTIONS, MANAGE_MESSAGES]);
```
to:
```rust
use serenity::model::Permissions;
foo(vec![Permissions::ADD_REACTIONS, Permissions::MANAGE_MESSAGES]);
```
Diffstat (limited to 'src/model/user.rs')
| -rw-r--r-- | src/model/user.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/user.rs b/src/model/user.rs index fb6acf0..a214b3d 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -176,10 +176,10 @@ impl CurrentUser { /// # /// # let mut cache = CACHE.write().unwrap(); /// - /// use serenity::model::permissions::*; + /// use serenity::model::Permissions; /// /// // assuming the cache has been unlocked - /// let url = match cache.user.invite_url(READ_MESSAGES | SEND_MESSAGES | EMBED_LINKS) { + /// let url = match cache.user.invite_url(Permissions::READ_MESSAGES | Permissions::SEND_MESSAGES | Permissions::EMBED_LINKS) { /// Ok(v) => v, /// Err(why) => { /// println!("Error getting invite url: {:?}", why); |