fix build error
This commit is contained in:
parent
aed5ab9187
commit
63a3233e12
@ -106,7 +106,7 @@ impl KeywordType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_file(file: impl io::Read) -> Result<json::JsonValue, Box<std::error::Error>> {
|
fn parse_file(file: impl io::Read) -> Result<json::JsonValue, Box<dyn std::error::Error>> {
|
||||||
let buf = io::BufReader::new(file);
|
let buf = io::BufReader::new(file);
|
||||||
let reader = TextReader::new(buf, KOI8_R, DecoderTrap::Ignore);
|
let reader = TextReader::new(buf, KOI8_R, DecoderTrap::Ignore);
|
||||||
|
|
||||||
@ -262,14 +262,14 @@ fn process_files(files: &&[PathBuf]) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), Box<std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
// open archive just to list files
|
// open archive just to list files
|
||||||
let zip_file = fs::File::open(BASE_FILENAME)?;
|
let zip_file = fs::File::open(BASE_FILENAME)?;
|
||||||
let zip_reader = io::BufReader::new(zip_file);
|
let zip_reader = io::BufReader::new(zip_file);
|
||||||
let mut archive = zip::ZipArchive::new(zip_reader)?;
|
let mut archive = zip::ZipArchive::new(zip_reader)?;
|
||||||
|
|
||||||
let source_files: Vec<PathBuf> = (0..archive.len())
|
let source_files: Vec<PathBuf> = (0..archive.len())
|
||||||
.map(|i| archive.by_index(i).unwrap().sanitized_name())
|
.map(|i| archive.by_index(i).unwrap().mangled_name())
|
||||||
.filter(|name| {
|
.filter(|name| {
|
||||||
// skip files without "txt" extension
|
// skip files without "txt" extension
|
||||||
match name.extension() {
|
match name.extension() {
|
||||||
|
Loading…
Reference in New Issue
Block a user