fix: forgot unwrap_or_default #107
Annotations
2 errors and 1 warning
use of moved value: `platform`:
src/sources/hangar.rs#L80
error[E0382]: use of moved value: `platform`
--> src/sources/hangar.rs:80:13
|
77 | let platform = self.get_platform();
| -------- move occurs because `platform` has type `std::option::Option<mcapi::hangar::Platform>`, which does not implement the `Copy` trait
78 | mcapi::hangar::VersionsFilter {
79 | platform_version: platform.map(|_| self.0.mc_version().to_owned()),
| -------- --------------------------------------- `platform` moved due to this method call
| |
| help: consider calling `.as_ref()` or `.as_mut()` to borrow the type's contents
80 | platform,
| ^^^^^^^^ value used here after move
|
note: `std::option::Option::<T>::map` takes ownership of the receiver `self`, which moves `platform`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:1067:22
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
79 | platform_version: platform.clone().map(|_| self.0.mc_version().to_owned()),
| ++++++++
|
publish
buildx failed with: ERROR: failed to solve: process "/bin/sh -c cargo build --target x86_64-unknown-linux-musl --release && cp /app/target/x86_64-unknown-linux-musl/release/mcman /app/mcman" did not complete successfully: exit code: 101
|
publish
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, docker/setup-buildx-action@v2, docker/login-action@v2, docker/metadata-action@v4, docker/build-push-action@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|