Skip to content

Commit 852adb0

Browse files
authored
fix: some spelling fixes and excludes (#621)
* fix: some spelling fixes and excludes * build: removed unused code
1 parent ab279ca commit 852adb0

File tree

4 files changed

+42
-201
lines changed

4 files changed

+42
-201
lines changed

.vscode/settings.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,43 @@
66
"coverage-gutters.coverageFileNames": [
77
"lcov.info"
88
],
9+
"cSpell.ignoreRegExpList": [
10+
"/\"[^\"]*\\\\u{1b}\\[[^\"]*\"/g",
11+
"/r#\".*\\\\u001b\\[.*\"#/g",
12+
"/\"[^\"]*\\\\x1b\\[[^\"]*\"/g"
13+
],
14+
"cSpell.words": [
15+
"AKBNIJGHERHBNMCKJABHSDJ",
16+
"amet",
17+
"ampm",
18+
"april",
19+
"bfnrt",
20+
"bytefmt",
21+
"cdef",
22+
"cpus",
23+
"Deque",
24+
"EVFILT",
25+
"february",
26+
"FFNOP",
27+
"friday",
28+
"ibuf",
29+
"itoa",
30+
"january",
31+
"july",
32+
"june",
33+
"naaaa",
34+
"nbbbb",
35+
"november",
36+
"october",
37+
"orem",
38+
"psum",
39+
"saturday",
40+
"stty",
41+
"thursday",
42+
"tuesday",
43+
"unexp",
44+
"unhex",
45+
"wednesday",
46+
"wyhash"
47+
]
948
}

src/input.rs

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use crate::{
1919
error::{Result, HILITE},
2020
index::{Index, Indexer, SourceBlock, SourceMetadata},
2121
iox::ReadFill,
22-
pool::SQPool,
2322
replay::{ReplayBufCreator, ReplayBufReader, ReplaySeekReader},
2423
tee::TeeReader,
2524
vfs::{FileSystem, LocalFileSystem},
@@ -29,7 +28,6 @@ use crate::{
2928

3029
pub type SequentialStream = Box<dyn ReadMeta + Send + Sync>;
3130
pub type RandomAccessStream = Box<dyn ReadSeekMeta + Send + Sync>;
32-
pub type BufPool = SQPool<Vec<u8>>;
3331

3432
// ---
3533

@@ -629,26 +627,12 @@ impl<II: Iterator<Item = usize>> Iterator for Blocks<IndexedInput, II> {
629627
pub struct Block<I> {
630628
input: Arc<I>,
631629
index: usize,
632-
buf_pool: Option<Arc<BufPool>>,
633630
}
634631

635632
impl Block<IndexedInput> {
636633
#[inline]
637634
pub fn new(input: Arc<IndexedInput>, index: usize) -> Self {
638-
Self {
639-
input,
640-
index,
641-
buf_pool: None,
642-
}
643-
}
644-
645-
#[inline]
646-
pub fn with_buf_pool(self, buf_pool: Arc<BufPool>) -> Self {
647-
Self {
648-
input: self.input,
649-
index: self.index,
650-
buf_pool: Some(buf_pool),
651-
}
635+
Self { input, index }
652636
}
653637

654638
#[inline]
@@ -692,11 +676,7 @@ impl BlockLines<IndexedInput> {
692676
pub fn new(mut block: Block<IndexedInput>) -> Result<Self> {
693677
let (buf, total) = {
694678
let block = &mut block;
695-
let mut buf = if let Some(pool) = &block.buf_pool {
696-
pool.checkout() // TODO: implement checkin
697-
} else {
698-
Vec::new()
699-
};
679+
let mut buf = Vec::new();
700680
let source_block = block.source_block();
701681
buf.resize(source_block.size.try_into()?, 0);
702682
let mut stream = block.input.stream.lock().unwrap();
@@ -707,7 +687,7 @@ impl BlockLines<IndexedInput> {
707687
};
708688
Ok(Self {
709689
block,
710-
buf: Arc::new(buf), // TODO: optimize allocations
690+
buf: Arc::new(buf),
711691
total,
712692
current: 0,
713693
byte: 0,

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ mod filtering;
2828
mod formatting;
2929
mod fsmon;
3030
mod model;
31-
mod pool;
3231
mod replay;
3332
mod scanning;
3433
mod serdex;

src/pool.rs

Lines changed: 0 additions & 177 deletions
This file was deleted.

0 commit comments

Comments
 (0)