Skip to content

Commit dcdd4df

Browse files
committed
fix: 🚨 fix clippy warnings
1 parent 2933242 commit dcdd4df

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/directory.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::ops::{Index, IndexMut, Range};
55
use std::slice::{Iter, SliceIndex};
66

77
#[cfg(feature = "async")]
8-
use futures::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};
8+
use futures::{AsyncReadExt, AsyncWrite, AsyncWriteExt};
99
#[cfg(feature = "async")]
1010
use integer_encoding::{VarIntAsyncReader, VarIntAsyncWriter};
1111

@@ -97,9 +97,9 @@ impl<'a> IntoIterator for &'a Directory {
9797

9898
impl Directory {
9999
#[duplicate_item(
100-
fn_name cfg_async_filter input_traits decompress(compression, binding) read_varint(type, reader) async;
101-
[from_reader_impl] [cfg(all())] [impl Read] [decompress(compression, &mut binding)] [reader.read_varint::<type>()] [];
102-
[from_async_reader_impl] [cfg(feature="async")] [(impl AsyncRead + Unpin + Send + AsyncReadExt)] [decompress_async(compression, &mut binding)] [reader.read_varint_async::<type>().await] [async];
100+
fn_name cfg_async_filter input_traits decompress(compression, binding) read_varint(type, reader) async;
101+
[from_reader_impl] [cfg(all())] [impl Read] [decompress(compression, &mut binding)] [reader.read_varint::<type>()] [];
102+
[from_async_reader_impl] [cfg(feature="async")] [(impl Unpin + Send + AsyncReadExt)] [decompress_async(compression, &mut binding)] [reader.read_varint_async::<type>().await] [async];
103103
)]
104104
#[allow(clippy::needless_range_loop)]
105105
#[cfg_async_filter]
@@ -300,7 +300,7 @@ impl Directory {
300300
/// ```
301301
#[cfg(feature = "async")]
302302
pub async fn from_async_reader(
303-
input: &mut (impl AsyncRead + Unpin + Send + AsyncReadExt),
303+
input: &mut (impl Unpin + Send + AsyncReadExt),
304304
length: u64,
305305
compression: Compression,
306306
) -> Result<Self> {

src/header/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub struct Header {
4848
/// Length (in bytes) of tile data section
4949
pub tile_data_length: u64,
5050

51-
/// Number of tiles, which are addressable in this PMTiles archive
51+
/// Number of tiles, which are addressable in this `PMTiles` archive
5252
pub num_addressed_tiles: u64,
5353

5454
/// Number of directory entries, that point to a tile
@@ -58,7 +58,7 @@ pub struct Header {
5858
pub num_tile_content: u64,
5959

6060
/// Indicates whether this archive is clustered, which means that
61-
/// all directory entries are ordered in ascending order by tile_ids
61+
/// all directory entries are ordered in ascending order by `tile_ids`
6262
#[deku(bits = 8)]
6363
pub clustered: bool,
6464

src/tile_manager.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct TileManager<R> {
3030
/// hash of tile -> bytes of tile
3131
data_by_hash: HashMap<u64, Vec<u8>>,
3232

33-
/// tile_id -> hash of tile
33+
/// `tile_id` -> hash of tile
3434
tile_by_id: HashMap<u64, TileManagerTile>,
3535

3636
/// hash of tile -> ids with this hash

src/util/read_directories.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[cfg(feature = "async")]
22
use async_recursion::async_recursion;
33
#[cfg(feature = "async")]
4-
use futures::io::{AsyncRead, AsyncReadExt, AsyncSeekExt};
4+
use futures::io::{AsyncReadExt, AsyncSeekExt};
55
use std::collections::HashMap;
66
use std::io::{Read, Result, Seek};
77
use std::ops::RangeBounds;
@@ -112,7 +112,7 @@ pub fn read_directories(
112112
#[allow(clippy::module_name_repetitions)]
113113
#[cfg(feature = "async")]
114114
pub async fn read_directories_async(
115-
reader: &mut (impl AsyncRead + Unpin + Send + AsyncReadExt + AsyncSeekExt),
115+
reader: &mut (impl Unpin + Send + AsyncReadExt + AsyncSeekExt),
116116
compression: Compression,
117117
root_dir_offset_length: (u64, u64),
118118
leaf_dir_offset: u64,
@@ -145,9 +145,9 @@ fn range_end_inc(range: &impl RangeBounds<u64>) -> Option<u64> {
145145
}
146146

147147
#[duplicate_item(
148-
fn_name cfg_async_filter async add_await(code) seek_start(reader, offset) FilterRangeTraits input_traits read_directory(reader, len, compression);
149-
[read_dir_rec] [cfg(all())] [] [code] [reader.seek(std::io::SeekFrom::Start(offset))] [(impl RangeBounds<u64>)] [(impl Read + Seek)] [Directory::from_reader(reader, len, compression)];
150-
[read_dir_rec_async] [cfg(feature="async")] [#[async_recursion] async] [code.await] [reader.seek(futures::io::SeekFrom::Start(offset)).await] [(impl RangeBounds<u64> + Sync + Send)] [(impl AsyncRead + Unpin + Send + AsyncReadExt + AsyncSeekExt)] [Directory::from_async_reader(reader, len, compression).await];
148+
fn_name cfg_async_filter async add_await(code) seek_start(reader, offset) FilterRangeTraits input_traits read_directory(reader, len, compression);
149+
[read_dir_rec] [cfg(all())] [] [code] [reader.seek(std::io::SeekFrom::Start(offset))] [(impl RangeBounds<u64>)] [(impl Read + Seek)] [Directory::from_reader(reader, len, compression)];
150+
[read_dir_rec_async] [cfg(feature="async")] [#[async_recursion] async] [code.await] [reader.seek(futures::io::SeekFrom::Start(offset)).await] [(impl RangeBounds<u64> + Sync + Send)] [(impl Unpin + Send + AsyncReadExt + AsyncSeekExt)] [Directory::from_async_reader(reader, len, compression).await];
151151
)]
152152
#[cfg_async_filter]
153153
async fn fn_name(

0 commit comments

Comments
 (0)