aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-24 15:26:49 +0200
committeracdenisSK <[email protected]>2017-08-24 16:36:01 +0200
commitb3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3 (patch)
tree315e16f7b252d22b5f832302e722a85c9e6a9b6e /src/utils
parentAllow FromStr for User to use REST (#147) (diff)
downloadserenity-b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3.tar.xz
serenity-b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3.zip
Revamp `RwLock` usage in the lib
Also not quite sure if they goofed rustfmt or something, but its changes it did were a bit bizarre.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/message_builder.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/message_builder.rs b/src/utils/message_builder.rs
index 8f13db2..2f714ec 100644
--- a/src/utils/message_builder.rs
+++ b/src/utils/message_builder.rs
@@ -852,8 +852,11 @@ impl Content {
pub fn to_string(&self) -> String {
let capacity =
self.inner.len() + if self.bold { 4 } else { 0 } + if self.italic { 2 } else { 0 } +
- if self.strikethrough { 4 } else { 0 } +
- if self.underline { 4 } else { 0 } + if self.code { 2 } else { 0 };
+ if self.strikethrough { 4 } else { 0 } + if self.underline {
+ 4
+ } else {
+ 0
+ } + if self.code { 2 } else { 0 };
let mut new_str = String::with_capacity(capacity);
if self.bold {