Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

「第三章」代码清单3-40 代码错误 #213

Closed
QiBaobin opened this issue Jun 14, 2019 · 3 comments
Closed

「第三章」代码清单3-40 代码错误 #213

QiBaobin opened this issue Jun 14, 2019 · 3 comments
Labels
已修订 已经修订并提交给出版社 第三章 第三章

Comments

@QiBaobin
Copy link

  1. 两个方法都不是对象安全的,所以后面两个例子即使改正了一个还是不安全的. 注释有误.
  2. 第二个例子拆分两个trait都叫Foo, 第一个应该叫Bar. 同样, 两个方法都是不安全的话, 拆分就没有意义了.

所以,感觉第一个方法应该改成一个对象安全的才对!

trait Foo {
    fn bad<T>(&self, x: T); // -> fn good(&self);
    fn new() -> Self;
}
@ZhangHanDong
Copy link
Owner

@QiBaobin 感谢反馈。这个问题还在勘误中,最近会总结出一个结果。不过前面也有一些讨论,可以选择「精选」label来查看。

@ZhangHanDong ZhangHanDong added the 第三章 第三章 label Jun 15, 2019
@ZhangHanDong ZhangHanDong added this to the 第四次印刷 milestone Jun 15, 2019
@ZhangHanDong
Copy link
Owner

#51

合并

@ZhangHanDong
Copy link
Owner

归并到了 #137

@ZhangHanDong ZhangHanDong added the 已修订 已经修订并提交给出版社 label Jun 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
已修订 已经修订并提交给出版社 第三章 第三章
Projects
None yet
Development

No branches or pull requests

2 participants