Rust: Why does this function take &Vec, but its parameter is of type &[String]?

后端 未结 0 1640
误落风尘
误落风尘 2021-01-12 04:02

I\'m reading through the Rust book, and this example looks a bit confusing:

use std::env;
use std::fs;

fn main() {
    let args: Vec = env::arg         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题