Rustln

Results 6 comments of Rustln

建议增加 `extern crate 包名` 说明,阅读很多开源项目,发现顶部都有此代码。 在 Rust 2015 版或更早版本需要这个导入语句,不过 Rust 2018 之后 99% 的情况下无需使用: 官方说明:https://doc.rust-lang.org/edition-guide/rust-2018/path-changes.html ![image](https://user-images.githubusercontent.com/100085326/158349529-8c8d01bd-fcc0-4a36-b1cc-7a87d612806c.png) **反正一句话解释:`extern crate xxx` 相当于现在的 `use xxx`。** ![image](https://user-images.githubusercontent.com/100085326/158350523-d7c76002-bacc-4bd4-9ed1-2e39abf0710f.png) ![image](https://user-images.githubusercontent.com/100085326/158350381-f043f10b-b0f0-4201-95d5-9ddafd8775b9.png)

看到比较好的解释: ![image](https://user-images.githubusercontent.com/100085326/158350203-c52dc6d0-2f21-4dbb-9577-55b9c8f70c24.png)

@Kangaxx-0 In Rust language, the following code is equivalent. ```rust let x = &1; ``` and ```rust let ref x = 1; ``` ----- ```rust let y = *x; ```...

Yes, in this case, `&` it doesn't seem necessary. Now I can't understand the author's motivation. Your question is right. Of course, you don't have to pay too much attention...

可以考虑使用 `Rust` 版本的 `Tauri`,[github](https://github.com/tauri-apps/tauri)