瀏覽代碼

Use proper split by whitespace

Frans Bergman 7 年之前
父節點
當前提交
db1152c670
共有 1 個文件被更改,包括 1 次插入1 次删除
  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("");