在web :: Json中返回数据时,如何避免复制矢量切片?

时间:2019-05-24 17:50:39

标签: rust actix-web

有没有一种方法可以在下面的代码中返回不涉及克隆的城市?

let lines = ["Hi","Bye","Gone"];

let match = false;

for(line in lines){
  if(line === "Bye"){
  match = true;
  }
}

console.log(match);

0 个答案:

没有答案