💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ### 指针赋值 ``` let s1 = String::from("hello"); let s2 = s1; println("s1 = {}, s2 = {}", s1, s2); //报错s1^^ value borrowed here after move //但是给s2定义变量时 let s2 = s1.clone(); //输出的时候不会出错 ``` ### 普通类型赋值 ``` let s1 = 5 let s2 = s1; println("s1 = {}, s2 = {}", s1, s2); //不会出问题 ```