Kilerd / blog

static blog built with staple
https://www.kilerd.me
1 stars 1 forks source link

https://www.kilerd.me/rust-auto-deref/ 存在错误 #2

Closed ficapy closed 4 years ago

ficapy commented 4 years ago
我们并不需要 deref_struct.0.eq(String::from("hello world)) 的写法

这个地方用String是不行的,需要是&String或者&str

Kilerd commented 4 years ago

多谢勘误,我完全注意在 Deref上面了,没有看文本,不过代码里面写的是对的。