Skip to content

ISSUE: 42 and 30, implement headers to catalog v1 and get MimeType #142

ISSUE: 42 and 30, implement headers to catalog v1 and get MimeType

ISSUE: 42 and 30, implement headers to catalog v1 and get MimeType #142

Triggered via pull request October 25, 2023 21:12
Status Failure
Total duration 1m 8s
Artifacts

rust.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

11 errors
build
Process completed with exit code 101.
lint: src/backend/fs.rs#L10
error: unused import: `extract::BodyStream` --> src/backend/fs.rs:10:25 | 10 | use axum::{body::Bytes, extract::BodyStream}; | ^^^^^^^^^^^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings`
lint: src/structs.rs#L6
error: unused import: `axum::extract::BodyStream` --> src/structs.rs:6:5 | 6 | use axum::extract::BodyStream; | ^^^^^^^^^^^^^^^^^^^^^^^^^
lint: src/structs.rs#L7
error: unused import: `bytes::BytesMut` --> src/structs.rs:7:5 | 7 | use bytes::BytesMut; | ^^^^^^^^^^^^^^^
lint: src/frontend/http.rs#L40
error: unused variable: `is_mime_type` --> src/frontend/http.rs:40:47 | 40 | |(mut body_stream, mut remainder, mut is_mime_type)| async move { | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_mime_type` | = note: `-D unused-variables` implied by `-D warnings`
lint: src/frontend/http.rs#L40
error: variable does not need to be mutable --> src/frontend/http.rs:40:43 | 40 | |(mut body_stream, mut remainder, mut is_mime_type)| async move { | ----^^^^^^^^^^^^ | | | help: remove this `mut` | = note: `-D unused-mut` implied by `-D warnings`
lint: src/backend/fs.rs#L60
error[E0308]: mismatched types --> src/backend/fs.rs:60:35 | 60 | .try_par_then(None, move |(segment, (_, _, mime_type))| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected `Bytes`, found `(_, _)` | expected due to this | = note: expected struct `bytes::Bytes` found tuple `(_, _)`
lint: src/backend/fs.rs#L60
error[E0308]: mismatched types --> src/backend/fs.rs:60:35 | 60 | .try_par_then(None, move |(segment, (_, _, mime_type))| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected `Bytes`, found `(_, _)` | expected due to this | = note: expected struct `bytes::Bytes` found tuple `(_, _)`
lint: src/backend/fs.rs#L97
error[E0308]: mismatched types --> src/backend/fs.rs:97:34 | 97 | let seg_hashes: &[BaoHash] = &segment_hashes | _____________________----------___^ | | | | | expected due to this 98 | | .iter() 99 | | .map(|(bao_hash, _)| bao_hash) 100 | | .collect::<Vec<&BaoHash>>()[..]; | |_______________________________________^ expected `&[BaoHash]`, found `&[&BaoHash]` | = note: expected reference `&[structs::BaoHash]` found reference `&[&structs::BaoHash]`
lint: src/backend/fs.rs#L97
error[E0308]: mismatched types --> src/backend/fs.rs:97:34 | 97 | let seg_hashes: &[BaoHash] = &segment_hashes | _____________________----------___^ | | | | | expected due to this 98 | | .iter() 99 | | .map(|(bao_hash, _)| bao_hash) 100 | | .collect::<Vec<&BaoHash>>()[..]; | |_______________________________________^ expected `&[BaoHash]`, found `&[&BaoHash]` | = note: expected reference `&[structs::BaoHash]` found reference `&[&structs::BaoHash]`
lint: src/frontend/http.rs#L168
error[E0277]: the trait bound `fn(axum::extract::Path<std::string::String>, axum::extract::BodyStream) -> impl futures_util::Future<Output = std::result::Result<impl axum::response::IntoResponse, frontend::http::AppError>> {frontend::http::post_file}: axum::handler::Handler<_, _, _>` is not satisfied --> src/frontend/http.rs:168:35 | 168 | .route("/store/:pk", post(post_file)) | ---- ^^^^^^^^^ the trait `axum::handler::Handler<_, _, _>` is not implemented for fn item `fn(axum::extract::Path<std::string::String>, axum::extract::BodyStream) -> impl futures_util::Future<Output = std::result::Result<impl axum::response::IntoResponse, frontend::http::AppError>> {frontend::http::post_file}` | | | required by a bound introduced by this call | = help: the following other types implement trait `axum::handler::Handler<T, S, B>`: <axum::handler::Layered<L, H, T, S, B, B2> as axum::handler::Handler<T, S, B2>> <axum::routing::MethodRouter<S, B> as axum::handler::Handler<(), S, B>> note: required by a bound in `axum::routing::post` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/axum-0.6.11/src/routing/method_routing.rs:407:1 | 407 | top_level_handler_fn!(post, POST); | ^^^^^^^^^^^^^^^^^^^^^^----^^^^^^^ | | | | | required by a bound in this function | required by this bound in `post` = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)