Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend compiling error while "cargo run" #225

Open
lovelord83 opened this issue Feb 18, 2022 · 1 comment
Open

Backend compiling error while "cargo run" #225

lovelord83 opened this issue Feb 18, 2022 · 1 comment

Comments

@lovelord83
Copy link

Hello there,
I'm in trouble compiling project on a fresh new ubuntu 20.04 (behind details)

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal


Linux docker 5.13.0-30-generic #33~20.04.1-Ubuntu SMP Mon Feb 7 14:25:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

running "cargo run" from /LegacyPlayersV3/Backend

I receive those errors:

Compiling backend v0.2.0 (/LegacyPlayersV3/Backend)
error[E0599]: no function or associated item named `with_options` found for struct `std::fs::File` in the current scope
   --> Backend/src/modules/live_data_processor/tools/server/server_post_processing.rs:323:47
    |
323 |         let mut open_options = std::fs::File::with_options();
    |                                               ^^^^^^^^^^^^ function or associated item not found in `std::fs::File`

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/package.rs:19:60
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).unwrap();
   |                                                            ^^^^^^^^^^^^ expected struct `rocket_http::header::content_type::Conte                  ntType`, found struct `rocket::http::ContentType`
   |
   = note: expected reference `&rocket_http::header::content_type::ContentType`
              found reference `&rocket::http::ContentType`

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/package.rs:19:74
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).unwrap();
   |                                                                          ^^^^ expected struct `rocket::data::data::Data`, found s                  truct `rocket::Data`
   |
   = note: perhaps two different versions of crate `rocket` are being used?

error[E0599]: no method named `unwrap` found for opaque type `impl std::future::Future<Output = Result<MultipartFormData, MultipartFor                  mDataError>>` in the current scope
  --> Backend/src/modules/live_data_processor/transfer/package.rs:19:89
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).unwrap();
   |                                                                                         ^^^^^^ method not found in `impl std::fut                  ure::Future<Output = Result<MultipartFormData, MultipartFormDataError>>`
   |
help: consider `await`ing on the `Future` and calling the method on its `Output`
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).await.unwrap();
   |                                                                                         ++++++

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/upload.rs:32:60
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).unwrap();
   |                                                            ^^^^^^^^^^^^ expected struct `rocket_http::header::content_type::Conte                  ntType`, found struct `rocket::http::ContentType`
   |
   = note: expected reference `&rocket_http::header::content_type::ContentType`
              found reference `&rocket::http::ContentType`

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/upload.rs:32:74
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).unwrap();
   |                                                                          ^^^^^^^^^ expected struct `rocket::data::data::Data`, fo                  und struct `rocket::Data`
   |
   = note: perhaps two different versions of crate `rocket` are being used?

error[E0599]: no method named `unwrap` found for opaque type `impl std::future::Future<Output = Result<MultipartFormData, MultipartFor                  mDataError>>` in the current scope
  --> Backend/src/modules/live_data_processor/transfer/upload.rs:32:94
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).unwrap();
   |                                                                                              ^^^^^^ method not found in `impl std                  ::future::Future<Output = Result<MultipartFormData, MultipartFormDataError>>`
   |
help: consider `await`ing on the `Future` and calling the method on its `Output`
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).await.unwrap();
   |                                                                                              ++++++

Some errors have detailed explanations: E0308, E0599.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `backend` due to 7 previous errors
root@docker:/LegacyPlayersV3/Backend# cargo run
   Compiling backend v0.2.0 (/LegacyPlayersV3/Backend)
error[E0599]: no function or associated item named `with_options` found for struct `std::fs::File` in the current scope
   --> Backend/src/modules/live_data_processor/tools/server/server_post_processing.rs:323:47
    |
323 |         let mut open_options = std::fs::File::with_options();
    |                                               ^^^^^^^^^^^^ function or associated item not found in `std::fs::File`

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/package.rs:19:60
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).unwrap();
   |                                                            ^^^^^^^^^^^^ expected struct `rocket_http::header::content_type::Conte                  ntType`, found struct `rocket::http::ContentType`
   |
   = note: expected reference `&rocket_http::header::content_type::ContentType`
              found reference `&rocket::http::ContentType`

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/package.rs:19:74
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).unwrap();
   |                                                                          ^^^^ expected struct `rocket::data::data::Data`, found s                  truct `rocket::Data`
   |
   = note: perhaps two different versions of crate `rocket` are being used?

error[E0599]: no method named `unwrap` found for opaque type `impl std::future::Future<Output = Result<MultipartFormData, MultipartFor                  mDataError>>` in the current scope
  --> Backend/src/modules/live_data_processor/transfer/package.rs:19:89
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).unwrap();
   |                                                                                         ^^^^^^ method not found in `impl std::fut                  ure::Future<Output = Result<MultipartFormData, MultipartFormDataError>>`
   |
help: consider `await`ing on the `Future` and calling the method on its `Output`
   |
19 |     let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).await.unwrap();
   |                                                                                         ++++++

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/upload.rs:32:60
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).unwrap();
   |                                                            ^^^^^^^^^^^^ expected struct `rocket_http::header::content_type::Conte                  ntType`, found struct `rocket::http::ContentType`
   |
   = note: expected reference `&rocket_http::header::content_type::ContentType`
              found reference `&rocket::http::ContentType`

error[E0308]: mismatched types
  --> Backend/src/modules/live_data_processor/transfer/upload.rs:32:74
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).unwrap();
   |                                                                          ^^^^^^^^^ expected struct `rocket::data::data::Data`, fo                  und struct `rocket::Data`
   |
   = note: perhaps two different versions of crate `rocket` are being used?

error[E0599]: no method named `unwrap` found for opaque type `impl std::future::Future<Output = Result<MultipartFormData, MultipartFor                  mDataError>>` in the current scope
  --> Backend/src/modules/live_data_processor/transfer/upload.rs:32:94
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).unwrap();
   |                                                                                              ^^^^^^ method not found in `impl std                  ::future::Future<Output = Result<MultipartFormData, MultipartFormDataError>>`
   |
help: consider `await`ing on the `Future` and calling the method on its `Output`
   |
32 |     let mut multipart_form_data = MultipartFormData::parse(content_type, form_data, options).await.unwrap();
   |                                                                                              ++++++

Some errors have detailed explanations: E0308, E0599.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `backend` due to 7 previous errors
@Geigerkind
Copy link
Owner

You may have to use an older version now of Rust. As the instructions were written 2 years ago now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants