diff --git a/fastgmad-bin/src/main.rs b/fastgmad-bin/src/main.rs index 48de5b6..deb9431 100644 --- a/fastgmad-bin/src/main.rs +++ b/fastgmad-bin/src/main.rs @@ -1,3 +1,5 @@ +#![allow(clippy::unnecessary_literal_unwrap)] + use fastgmad::{ bin_prelude::*, create::{CreateGmaConfig, CreateGmadOut}, diff --git a/fastgmad-lib/src/lib.rs b/fastgmad-lib/src/lib.rs index faac4c7..e0e8ca6 100644 --- a/fastgmad-lib/src/lib.rs +++ b/fastgmad-lib/src/lib.rs @@ -7,6 +7,7 @@ //! `binary` - Recommended if you're using fastgmad in a binary as this enables some binary-related helpers. #![cfg_attr(not(feature = "binary"), warn(missing_docs))] +#![allow(clippy::unnecessary_literal_unwrap)] const GMA_MAGIC: &[u8] = b"GMAD"; const GMA_VERSION: u8 = 3; diff --git a/fastgmad-lib/src/workshop/mod.rs b/fastgmad-lib/src/workshop/mod.rs index 011369e..d623a48 100644 --- a/fastgmad-lib/src/workshop/mod.rs +++ b/fastgmad-lib/src/workshop/mod.rs @@ -227,7 +227,7 @@ fn workshop_upload(#[cfg(feature = "binary")] noprogress: bool, kind: PublishKin // Add "Addon" and the addon type to the tags let tags = { - let mut tags = BTreeSet::from_iter(metadata.tags.into_iter()); + let mut tags = BTreeSet::from_iter(metadata.tags); tags.insert("Addon".to_string()); @@ -389,7 +389,7 @@ impl ContentPath { let temp_gma_path = dir.join("fastgmad.gma"); - let symlink_result = { + let symlink_result: Result<(), FastGmadError> = { #[cfg(windows)] { let res = std::os::windows::fs::symlink_file(gma_path, &temp_gma_path); @@ -401,16 +401,20 @@ impl ContentPath { } res } + + /* + Steamworks doesn't recognise symlinks on Unix :< + #[cfg(unix)] { std::os::unix::fs::symlink(gma_path, &temp_gma_path) } #[cfg(not(any(windows, unix)))] + */ + + #[cfg(not(windows))] { - Err(FastGmadError::IoError(std::io::Error::new( - std::io::ErrorKind::Other, - "Unsupported platform", - ))) + Err(fastgmad_io_error!(error: std::io::Error::from(std::io::ErrorKind::Unsupported))) } };