error[E0425]: cannot find value `raw_body` in this scope --> src/main.rs:113:45 | 113 | let content = String::from_utf8_lossy(&raw_body); | ^^^^^^^^ not found in this scope warning: unused import: `BufRead` --> src/main.rs:3:15 | 3 | use std::io::{BufRead, BufReader, BufWriter, Read, Seek, Write}; | ^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused imports: `RecordType`, `Record`, `WarcHeader`, `WarcReader` --> src/main.rs:10:12 | 10 | use warc::{Record, RecordType, WarcHeader, WarcReader, RecordBuilder}; | ^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ error[E0308]: mismatched types --> src/main.rs:108:7 | 107 | match result { | ------ this expression has type `Result, warc::Error>` 108 | Ok((record_header, body)) => { | ^^^^^^^^^^^^^^^^^^^^^ expected `Record`, found `(_, _)` | = note: expected struct `Record` found tuple `(_, _)` error[E0599]: no method named `warc_type` found for enum `Result` in the current scope --> src/main.rs:110:30 | 110 | let is_response = record.warc_type() == &warc::RecordType::from("response"); | ^^^^^^^^^ method not found in `Result, Error>` | note: the method `warc_type` exists on the type `Record` --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/warc-0.3.1/src/record.rs:312:5 | 312 | pub fn warc_type(&self) -> &RecordType { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the `?` operator to extract the `Record` value, propagating a `Result::Err` value to the caller | 110 | let is_response = record?.warc_type() == &warc::RecordType::from("response"); | +