-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68fba7c
commit a303015
Showing
9 changed files
with
263 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "ferium" | ||
version = "3.27.0" | ||
version = "3.28.0" | ||
edition = "2021" | ||
authors = ["Ilesh Thiada (theRookieCoder) <[email protected]>", "薛詠謙 (KyleUltimate)", "Daniel Hauck (SolidTux)"] | ||
description = "Ferium is a CLI program for managing Minecraft mods from Modrinth, CurseForge, and Github Releases" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::sync::{Mutex, MutexGuard}; | ||
|
||
/// A sketchy way to not deal with mutex poisoning | ||
/// | ||
/// **WARNING**: If the poison had occured during a write, the data may be corrupted. | ||
/// _If_ unsafe code had poisoned the mutex, memory corruption is possible | ||
pub trait MutexExt<T> { | ||
fn force_lock(&self) -> MutexGuard<'_, T>; | ||
} | ||
|
||
impl<T> MutexExt<T> for Mutex<T> { | ||
fn force_lock(&self) -> MutexGuard<'_, T> { | ||
match self.lock() { | ||
Ok(guard) => guard, | ||
Err(error) => error.into_inner(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.