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<record<bufferedbody>, warc::error>`
108 | ok((record_header, body)) => {
| ^^^^^^^^^^^^^^^^^^^^^ expected `record<bufferedbody>`, found `(_, _)`
|
= note: expected struct `record<bufferedbody>`
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<record<bufferedbody>, error>`
|
Note: the method `warc_type` exists on the type `record<bufferedbody>`
--> /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<bufferedbody>` value, propagating a `result::err` value to the caller
|
110 | let is_response = record?.warc_type() == &warc::recordtype::from("response");
| +