rust-course icon indicating copy to clipboard operation
rust-course copied to clipboard

“连续六年成为全世界最受喜爱的语言,无 GC 也无需手动内存管理、极高的性能和安全性、过程/OO/函数式编程、优秀的包管理、JS 未来基石" — 工作之余的第二语言来试试 Rust 吧。<<Rust语言圣经>>拥有全面且深入的讲解...

Results 88 rust-course issues
Sort by recently updated
recently updated
newest added

mdbook目前用的elasticlunr是比较老的项目,对lunr支持的中文,并不能很好的支持,目前还没找到太好的办法来支持中文搜索 https://github.com/rust-lang/mdBook/issues/1081

The original code was not compliant with the use of the Rust norm due to avoidance. https://rust-lang.github.io/rust-clippy/master/index.html#len_zero

[**这一节**](https://course.rs/basic/result-error/result.html#%E4%BC%A0%E6%92%AD%E7%95%8C%E7%9A%84%E5%A4%A7%E6%98%8E%E6%98%9F-) ```rust fn read_username_from_file() -> Result { let mut f = File::open("hello.txt")?; let mut s = String::new(); f.read_to_string(&mut s)?; Ok(s) } ``` 以上代码执行报错 ![image](https://user-images.githubusercontent.com/34206897/190144722-8d2a9a39-2739-4b17-939f-774dd3434155.png) ``` 745 | fn read_to_string(&mut self,...

对于再借用而言,rr 再借用时不会破坏借用规则,但是你不能在它的生命周期内 **再使用** 原来的借用 r,来看看对上段代码的分析: ```rust fn main() { let mut p = Point { x: 0, y: 0 }; let r = &mut p; // reborrow! 此时对`r`的再借用不会导致跟上面的借用冲突 let rr:...

# 问题描述 在本书[元组结构体](https://course.rs/basic/compound-type/struct.html#%E5%85%83%E7%BB%84%E7%BB%93%E6%9E%84%E4%BD%93tuple-struct)部分,仅说明了**声明**元组结构体的语法,但是在对应的练习中[练习](https://zh.practice.rs/compound-types/struct.html#%E4%B8%89%E7%A7%8D%E7%B1%BB%E5%9E%8B%E7%9A%84%E7%BB%93%E6%9E%84%E4%BD%93)中,第三题: ```rust // 填空并修复错误 struct Color(i32, i32, i32); struct Point(i32, i32, i32); fn main() { let v = Point(__, __, __); check_color(v); } fn check_color(p: Color) { let...

看这本书的时候,感觉书中这章的这段代码有点复杂,又是for循环,又是vector,又是`%`的,感觉和死锁这个问题关系不大,所以写了一个相对简单的版本,提上来看看。如果能合并进去就太好啦。

https://rust-lang.github.io/mdBook/format/configuration/renderers.html?highlight=cname#html-renderer-options

mdbook默认不支持中文搜索,能不能想办法加上?

fixed writing error.

wrong usage of thiserror and Anyhow.