浏览代码

Fix compilation error due to rand API change

timvisee 4 年之前
父节点
当前提交
dfb773a96e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/util.rs

+ 1 - 1
src/util.rs

@@ -1127,7 +1127,7 @@ impl From<ResponseError> for FollowError {
 pub fn rand_alphanum_string(len: usize) -> String {
     let mut rng = thread_rng();
     iter::repeat(())
-        .map(|()| rng.sample(Alphanumeric))
+        .map(|()| rng.sample(Alphanumeric) as char)
         .take(len)
         .collect()
 }