Skip to content

Commit f494974

Browse files
authored
Merge pull request #139 from code0-tech/135-reimplement-reader
Reimplement Reader
2 parents 8b7953c + 9290c1b commit f494974

File tree

8 files changed

+166
-269
lines changed

8 files changed

+166
-269
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ tokio = "1.47.0"
1818
futures = "0.3.31"
1919
zip = "6.0.0"
2020
bytes = "1.10.1"
21-
prost = "0.14.1"
21+
prost = "0.14.1"
22+
walkdir = "2.5.0"
23+
log = "0.4.28"

crates/package/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ license = "Apache-2.0"
99
readme = "../../README.md"
1010

1111
[dependencies]
12-
serde = { workspace = true }
13-
serde_json = { workspace = true }
14-
tucana = { workspace = true }
12+
walkdir = {workspace = true}
13+
serde_json = {workspace = true}
14+
serde = {workspace = true}
15+
tucana = {workspace = true}
16+
log = {workspace = true}

crates/package/src/enum/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod reader_error;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
use serde_json;
2+
use std::io;
3+
use std::path::PathBuf;
4+
5+
#[derive(Debug)]
6+
pub enum ReaderError {
7+
JsonError {
8+
path: PathBuf,
9+
error: serde_json::Error,
10+
},
11+
ReadFeatureError {
12+
path: String,
13+
source: Box<ReaderError>,
14+
},
15+
ReadDirectoryError {
16+
path: PathBuf,
17+
error: io::Error,
18+
},
19+
ReadFileError {
20+
path: PathBuf,
21+
error: io::Error,
22+
},
23+
DirectoryEntryError(io::Error),
24+
}

0 commit comments

Comments
 (0)