[fix,perf]: attempt to make FileProvider use a reqwest client reference #183
Annotations
12 errors and 4 warnings
cannot assign to `app.server.name` because it is borrowed:
src/commands/init/mod.rs#L99
error[E0506]: cannot assign to `app.server.name` because it is borrowed
--> src/commands/init/mod.rs:99:9
|
70 | InitType::Packwiz(app.packwiz().get_file_provider(&src)?)
| -------------------------------------
| |
| `app.server.name` is borrowed here
| argument requires that `app` is borrowed for `'static`
...
99 | app.server.name = name.clone();
| ^^^^^^^^^^^^^^^ `app.server.name` is assigned to here but it was already borrowed
|
cannot assign to `app.network` because it is borrowed:
src/commands/init/mod.rs#L96
error[E0506]: cannot assign to `app.network` because it is borrowed
--> src/commands/init/mod.rs:96:13
|
70 | InitType::Packwiz(app.packwiz().get_file_provider(&src)?)
| -------------------------------------
| |
| `app.network` is borrowed here
| argument requires that `app` is borrowed for `'static`
...
96 | app.network = Some(nw);
| ^^^^^^^^^^^ `app.network` is assigned to here but it was already borrowed
|
cannot borrow `app` as immutable because it is also borrowed as mutable:
src/commands/init/mod.rs#L92
error[E0502]: cannot borrow `app` as immutable because it is also borrowed as mutable
--> src/commands/init/mod.rs:92:13
|
70 | InitType::Packwiz(app.packwiz().get_file_provider(&src)?)
| -------------------------------------
| |
| mutable borrow occurs here
| argument requires that `app` is borrowed for `'static`
...
92 | app.info(format!(
| ^^^ immutable borrow occurs here
|
cannot assign to `app.network` because it is borrowed:
src/commands/init/mod.rs#L81
error[E0506]: cannot assign to `app.network` because it is borrowed
--> src/commands/init/mod.rs:81:9
|
70 | InitType::Packwiz(app.packwiz().get_file_provider(&src)?)
| -------------------------------------
| |
| `app.network` is borrowed here
| argument requires that `app` is borrowed for `'static`
...
81 | app.network = Some(Network::default());
| ^^^^^^^^^^^ `app.network` is assigned to here but it was already borrowed
|
temporary value dropped while borrowed:
src/commands/init/mod.rs#L70
error[E0716]: temporary value dropped while borrowed
--> src/commands/init/mod.rs:70:27
|
70 | InitType::Packwiz(app.packwiz().get_file_provider(&src)?)
| ^^^^^^^^^^^^^------------------------
| |
| creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'static`
71 | } else {
| - temporary value is freed at the end of this statement
|
`app` does not live long enough:
src/commands/init/mod.rs#L70
error[E0597]: `app` does not live long enough
--> src/commands/init/mod.rs:70:27
|
63 | let mut app = base_app.upgrade_with_default_server()?;
| ------- binding `app` declared here
...
70 | InitType::Packwiz(app.packwiz().get_file_provider(&src)?)
| ^^^----------------------------------
| |
| borrowed value does not live long enough
| argument requires that `app` is borrowed for `'static`
...
289 | }
| - `app` dropped here while still borrowed
|
`provider` does not live long enough:
src/interop/packwiz.rs#L65
error[E0597]: `provider` does not live long enough
--> src/interop/packwiz.rs:65:33
|
62 | pub async fn import_all(&mut self, from: &str) -> Result<()> {
| --------- lifetime `'1` appears in the type of `self`
63 | let provider = self.get_file_provider(from)?;
| -------- binding `provider` declared here
64 |
65 | self.import_from_source(&provider).await
| ------------------------^^^^^^^^^-
| | |
| | borrowed value does not live long enough
| argument requires that `provider` is borrowed for `'1`
66 | }
| - `provider` dropped here while still borrowed
|
cannot borrow `*self` as mutable because it is also borrowed as immutable:
src/interop/packwiz.rs#L65
error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable
--> src/interop/packwiz.rs:65:9
|
62 | pub async fn import_all(&mut self, from: &str) -> Result<()> {
| --------- lifetime `'1` appears in the type of `self`
63 | let provider = self.get_file_provider(from)?;
| ----------------------------
| |
| immutable borrow occurs here
| argument requires that `*self` is borrowed for `'1`
64 |
65 | self.import_from_source(&provider).await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
|
missing lifetime specifier:
src/commands/init/mod.rs#L46
error[E0106]: missing lifetime specifier
--> src/commands/init/mod.rs:46:13
|
46 | Packwiz(FileProvider),
| ^^^^^^^^^^^^ expected named lifetime parameter
|
help: consider introducing a named lifetime parameter
|
43 ~ pub enum InitType<'a> {
44 | Normal,
45 | MRPack(String),
46 ~ Packwiz(FileProvider<'a>),
|
|
clippy
Clippy had exited with the 101 exit code
|
build (ubuntu-latest)
Process completed with exit code 101.
|
build (windows-latest)
The operation was canceled.
|
clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
build (ubuntu-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build (windows-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|