@@ -149,7 +149,7 @@ impl ChannelCommandBase {
149
149
) ) ] )
150
150
}
151
151
( Some ( manual_key) , next_part) => {
152
- if next_part. is_none ( ) == true {
152
+ if next_part. is_none ( ) {
153
153
if let Some ( manual_data) = manuals. get ( manual_key) {
154
154
Ok ( vec ! [ ChannelCommandResponse :: Result ( format!(
155
155
"{}({})" ,
@@ -171,7 +171,7 @@ impl ChannelCommandBase {
171
171
let mut text_raw = String :: new ( ) ;
172
172
173
173
while let Some ( text_part) = parts. next ( ) {
174
- if text_raw. is_empty ( ) == false {
174
+ if ! text_raw. is_empty ( ) {
175
175
text_raw. push_str ( " " ) ;
176
176
}
177
177
@@ -209,7 +209,7 @@ impl ChannelCommandBase {
209
209
let text_bytes = text_raw. as_bytes ( ) ;
210
210
let text_bytes_len = text_bytes. len ( ) ;
211
211
212
- if text_raw. is_empty ( ) == true
212
+ if text_raw. is_empty ( )
213
213
|| text_bytes_len < 2
214
214
|| text_bytes[ 0 ] as char != TEXT_PART_BOUNDARY
215
215
|| text_bytes[ text_bytes_len - 1 ] as char != TEXT_PART_BOUNDARY
@@ -231,7 +231,7 @@ impl ChannelCommandBase {
231
231
debug ! ( "parsed text parts (post-processed): {}" , text_inner_string) ;
232
232
233
233
// Text must not be empty
234
- if text_inner_string. is_empty ( ) == false {
234
+ if ! text_inner_string. is_empty ( ) {
235
235
Some ( text_inner_string)
236
236
} else {
237
237
None
@@ -254,7 +254,7 @@ impl ChannelCommandBase {
254
254
) -> Option < MetaPartsResult < ' a > > {
255
255
if let Some ( part) = parts. next ( ) {
256
256
// Parse meta (with format: 'KEY(VALUE)'; no '(' or ')' is allowed in KEY and VALUE)
257
- if part. is_empty ( ) == false {
257
+ if ! part. is_empty ( ) {
258
258
if let Some ( index_open) = part. find ( META_PART_GROUP_OPEN ) {
259
259
let ( key_bound_start, key_bound_end) = ( 0 , index_open) ;
260
260
let ( value_bound_start, value_bound_end) = ( index_open + 1 , part. len ( ) - 1 ) ;
@@ -266,10 +266,10 @@ impl ChannelCommandBase {
266
266
) ;
267
267
268
268
// Ensure final key and value do not contain reserved syntax characters
269
- return if key. contains ( META_PART_GROUP_OPEN ) == false
270
- && key. contains ( META_PART_GROUP_CLOSE ) == false
271
- && value. contains ( META_PART_GROUP_OPEN ) == false
272
- && value. contains ( META_PART_GROUP_CLOSE ) == false
269
+ return if ! key. contains ( META_PART_GROUP_OPEN )
270
+ && ! key. contains ( META_PART_GROUP_CLOSE )
271
+ && ! value. contains ( META_PART_GROUP_OPEN )
272
+ && ! value. contains ( META_PART_GROUP_CLOSE )
273
273
{
274
274
debug ! ( "parsed meta part as: {} = {}" , key, value) ;
275
275
@@ -781,7 +781,7 @@ impl ChannelCommandControl {
781
781
CONTROL_TRIGGER_ACTIONS . join( ", " )
782
782
) ) ] ) ,
783
783
( Some ( action_key) , next_part) => {
784
- if next_part. is_none ( ) == true {
784
+ if next_part. is_none ( ) {
785
785
let action_key_lower = action_key. to_lowercase ( ) ;
786
786
787
787
match action_key_lower. as_str ( ) {
0 commit comments