advance/into-types/sized #708
Replies: 11 comments 26 replies
-
不太懂,为啥 Vec 不是动态大小类型? |
Beta Was this translation helpful? Give feedback.
-
讲的还是很透彻的!点赞! |
Beta Was this translation helpful? Give feedback.
-
“你能想到的几乎类型都实现了 Sized 特征” |
Beta Was this translation helpful? Give feedback.
-
上一章是特征,现在是这一章。都让我看了好几遍了😂 |
Beta Was this translation helpful? Give feedback.
-
fn main() { 这个报错里写的编译期不能知道这个str的size,是编译器的优化程度不足吧,这个size明显我们都是可以算出来的。 |
Beta Was this translation helpful? Give feedback.
-
主动转换成 str 的方式不可行,但是可以让编译器来帮我们完成,只要告诉它我们需要的类型即可。 为啥我不能主动转换 |
Beta Was this translation helpful? Give feedback.
-
这里居然没有 ZST,2333 |
Beta Was this translation helpful? Give feedback.
-
这里讲述 不知道这么理解是否正确? 如果正确的话本节内容是否应该往Rust的存储模型上靠一靠? |
Beta Was this translation helpful? Give feedback.
-
所以 fn main() {
let s1: Box<str> = "hello".into();
} 这里的Box有什么作用呢?Box的意义和用途是什么? |
Beta Was this translation helpful? Give feedback.
-
完蛋,每一分钟都在被劝退,怎么办? |
Beta Was this translation helpful? Give feedback.
-
advance/into-types/sized
https://course.rs/advance/into-types/sized.html
Beta Was this translation helpful? Give feedback.
All reactions