Skip to content

Commit e7b62c4

Browse files
Merge pull request #404 from lucklove/master
修正编译错误
2 parents 2229a1c + 6765e2f commit e7b62c4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

any/any.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
这下可坏了……Rust不支持重载啊!于是有人就很单纯的写了两个函数~~!
1212

1313
其实不用……我们只需要这么写……
14-
* 只能在nightly下编译通过
1514

1615
```rust
17-
#![feature(vec_push_all)]
1816
use std::any::Any;
1917
use std::fmt::Debug ;
2018

@@ -27,7 +25,7 @@ fn load_config<T:Any+Debug>(value: &T) -> Vec<String>{
2725
};
2826

2927
match value.downcast_ref::<Vec<String>>() {
30-
Some(v) => cfgs.push_all(&v),
28+
Some(v) => cfgs.extend_from_slice(&v),
3129
None =>(),
3230
}
3331

0 commit comments

Comments
 (0)