diff options
| author | Zeyla Hellyer <[email protected]> | 2018-04-26 21:02:02 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-05-27 19:39:47 -0700 |
| commit | 6bf29003a3cc8a8e55b9696961e8cef9f62d12b5 (patch) | |
| tree | eb751ca5b185eeacad8f83dbf746b24fd5864add /src/framework/standard | |
| parent | Voice fixes, better API adherence, bitrate control, documentation (diff) | |
| download | serenity-6bf29003a3cc8a8e55b9696961e8cef9f62d12b5.tar.xz serenity-6bf29003a3cc8a8e55b9696961e8cef9f62d12b5.zip | |
Make builders mutably borrowed
Change the builders so that they are now mutably borrowed, accepting
`&mut self` instead of `self`. Their methods now return `()` instead of
`Self`.
Upgrade path:
Change code such as the following:
```rust
channel.send_message(|m| m
.embed(|e| e
.description("test")
.title("title")));
```
to the following style:
```rust
channel.send_message(|mut m| {
m.embed(|mut e| {
e.description("test");
e.title("title");
e
});
m
});
```
Closes #159.
Diffstat (limited to 'src/framework/standard')
| -rw-r--r-- | src/framework/standard/help_commands.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs index 84a1399..c7b9f68 100644 --- a/src/framework/standard/help_commands.rs +++ b/src/framework/standard/help_commands.rs @@ -240,7 +240,7 @@ pub fn with_embeds<H: BuildHasher>( &help_options.striked_commands_tip_in_dm }; - if let Some(ref striked_command_text) = striked_command_tip{ + if let Some(ref striked_command_text) = striked_command_tip { embed.colour(help_options.embed_success_colour); embed.description(format!( "{}\n{}", |