소스 검색

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("");