这样的东西?
Table '_fact'. Scan count 1, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
[String, 0]
不是一种选择。
答案 0 :(得分:3)
这会创建一个空数组:
let thing: [String; 0] = [];
您还可以从数组中获取切片:
let thing: &[String] = &[];
您还可以使用as
:
some_function([] as [String; 0]);
some_function(&[] as &[String]);