我注意到这段代码:
((UINT4)inputLen << 3)) < ((UINT4)inputLen << 3))
我不明白比较:
use std::collections::HashSet;
type HS = HashSet<String>;
fn fn1(x: String, hs0: &mut HS, hs1: &mut HS) {
// ...
}
fn fn0(hs0: &mut HS, hs1: &mut HS) {
hs0.get("").map(|x| fn1(x.clone(), hs0, hs1));
}
fn main() {
let mut hs0 = HS::new();
let mut hs1 = HS::new();
fn0(&mut hs0, &mut hs1);
}
就像它总是返回0,对吗?
答案 0 :(得分:7)
没有这样的比较。看看括号是如何配对的:
是
(X < ((UINT4)inputLen << 3))
其中X
=
(context->count[0] += ((UINT4)inputLen << 3))