too-many-lists/ok-stack/type-optimizing #1162
Replies: 4 comments 6 replies
-
impl Drop for List 为什么需要引入两个T,如果只是需要知道内存大小或者函数处理类型一个T不就可以? |
Beta Was this translation helpful? Give feedback.
2 replies
-
为什么不直接写 type List = Option<Box<Node>>
#[derive(Clone)]
struct Node {...} 呢? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Option能用map本质是因为Option可以作为迭代器,具体可以看这个的介绍https://rust-unofficial.github.io/patterns/idioms/option-iter.html |
Beta Was this translation helpful? Give feedback.
1 reply
-
我有点不明白,为啥要手动impl Drop? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
too-many-lists/ok-stack/type-optimizing
https://course.rs/too-many-lists/ok-stack/type-optimizing.html
Beta Was this translation helpful? Give feedback.
All reactions