chore: fix warnings

This commit is contained in:
Zixuan Chen 2023-07-18 10:10:52 +08:00
parent 3d3c54eb92
commit 9d03fd787f
3 changed files with 4 additions and 3 deletions

View file

@ -56,6 +56,7 @@ fn bench_decode() {
let mut txn = loro.txn().unwrap();
let mut n = 0;
#[allow(warnings)]
for TextAction { pos, ins, del } in actions.iter() {
if n % 10 == 0 {
drop(txn);

View file

@ -501,8 +501,8 @@ impl OpLog {
let mut total_changes = 0;
let mut total_ops = 0;
let mut total_atom_ops = 0;
let mut total_dag_node = self.dag.map.len();
for (_, changes) in &self.changes {
let total_dag_node = self.dag.map.len();
for changes in self.changes.values() {
total_changes += changes.len();
for change in changes.iter() {
total_ops += change.ops.len();

View file

@ -3,7 +3,7 @@ use std::cmp::Ordering;
use crate::change::Lamport;
use crate::dag::{Dag, DagNode};
use crate::id::{Counter, ID};
use crate::span::{HasId, HasLamport, HasLamportSpan};
use crate::span::{HasId, HasLamport};
use crate::version::{Frontiers, ImVersionVector, VersionVector};
use rle::{HasIndex, HasLength, Mergable, Sliceable};