浏览代码

优化代码 (#1939)

vic 2 年之前
父节点
当前提交
6d3ed98744
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      core/bloom/bloom.go

+ 1 - 5
core/bloom/bloom.go

@@ -69,11 +69,7 @@ func (f *Filter) Exists(data []byte) (bool, error) {
 	if err != nil {
 		return false, err
 	}
-	if !isSet {
-		return false, nil
-	}
-
-	return true, nil
+	return isSet, nil
 }
 
 func (f *Filter) getLocations(data []byte) []uint {