rustbuild: get an empty slice the straight-forward way

This commit is contained in:
Wang Xuerui 2016-12-28 03:39:35 +08:00
parent d849b13267
commit 9d3616f78d
No known key found for this signature in database
GPG Key ID: 38544B4E2DE7FAB9

View File

@ -843,7 +843,7 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
let arr = if rule.host {
if self.build.flags.target.len() > 0 &&
self.build.flags.host.len() == 0 {
&hosts[..0]
&[]
} else {
hosts
}