rustlings
推荐一个学习rust非常好的repo:
Small exercises to get you used to reading and writing Rust code! - 学习rust语法的一些非常好的小练习
This project contains small exercises to get you used to reading and writing Rust code. This includes reading and responding to compiler messages!
这里放一下我的解答的地址:
https://github.com/yunwei37/os-summer-of-code-daily
第一天的这些部分都比较简单:
- quiz 1-4:一般是对应于上一章节刚完成的内容
- variables:变量
- if:if表达式
- function:函数
- primitive_types:主要类型
- structs:结构体
- strings:字符串
- enums:枚举
- tests:测试
- modules:模块
- macros:宏定义
- move_semantics:将值赋给另一个变量时移动它
第二天:
- errors