فهرست منبع

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