Skip to content

Commit 6f27031

Browse files
committed
make clippy happier
1 parent c0f0414 commit 6f27031

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

examples/cli.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
//! will decode the encoded data in somefile.bao and write it to /dev/null, printing
1818
//! information about the decoding process to stderr.
1919
use std::{
20-
io::{self, Cursor, Write},
20+
io::{self, Cursor},
2121
path::PathBuf,
2222
};
2323

2424
use anyhow::Context;
2525
use bao_tree::{
2626
blake3,
27-
io::{outboard::PreOrderMemOutboard, round_up_to_chunks, Header, Leaf, Parent},
27+
io::{outboard::PreOrderMemOutboard, round_up_to_chunks, Leaf, Parent},
2828
BlockSize, ChunkNum, ChunkRanges,
2929
};
3030
use bytes::Bytes;
@@ -179,12 +179,20 @@ fn parse_ranges(ranges: Vec<String>) -> anyhow::Result<RangeSet2<u64>> {
179179
}
180180

181181
mod sync {
182-
use bao_tree::io::sync::{
183-
encode_ranges_validated, DecodeResponseItem, DecodeResponseIter, Outboard,
182+
use std::io::{self, Cursor, Write};
183+
184+
use bao_tree::{
185+
io::{
186+
outboard::PreOrderMemOutboard,
187+
round_up_to_chunks,
188+
sync::{encode_ranges_validated, DecodeResponseItem, DecodeResponseIter, Outboard},
189+
Header, Leaf, Parent,
190+
},
191+
BlockSize, ChunkRanges,
184192
};
185193
use positioned_io::WriteAt;
186194

187-
use super::*;
195+
use crate::{parse_ranges, Args, Command, DecodeArgs, EncodeArgs, Message};
188196

189197
/// Encode a part of a file, given the outboard.
190198
fn encode(data: &[u8], outboard: impl Outboard, ranges: ChunkRanges) -> Message {

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@ fn pre_order_offset_loop(node: u64, len: u64) -> u64 {
655655
/// Split a range set into range sets for the left and right half of a node
656656
///
657657
/// Requires that the range set is minimal, it should not contain any redundant
658-
/// boundaries outside of the range of the node.
658+
/// boundaries outside of the range of the node. The values outside of the node
659+
/// range don't matter, so any change outside the range must be omitted.
659660
///
660661
/// Produces two range sets that are also minimal. A range set for left or right
661662
/// that covers the entire range of the node will be replaced with the set of

0 commit comments

Comments
 (0)