Browse Source

Use proper split by whitespace

Frans Bergman 7 năm trước cách đây
mục cha
commit
db1152c670
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/main.rs

+ 1 - 1
src/main.rs

@@ -67,7 +67,7 @@ pub fn main() {
                 }
 
                 // reply to a command if there was one
-                let mut split = message.content.split(' ');
+                let mut split = message.content.split_whitespace();
                 let first_word = split.next().unwrap_or("");
                 let argument = split.next().unwrap_or("");