mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-22 19:29:14 +03:00
fix nightly builds
* update proc-macro2 * fix new warnings
This commit is contained in:
parent
05ce018e06
commit
cb9cf3ad0c
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -1397,9 +1397,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.51"
|
||||
version = "1.0.63"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6"
|
||||
checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
@ -22,7 +22,11 @@
|
||||
//TODO: get this in someday since expect still leads us to crashes sometimes
|
||||
// #![deny(clippy::expect_used)]
|
||||
//TODO: consider cleaning some up and allow specific places
|
||||
#![allow(clippy::significant_drop_tightening)]
|
||||
#![allow(
|
||||
clippy::significant_drop_tightening,
|
||||
// TODO:
|
||||
clippy::missing_panics_doc
|
||||
)]
|
||||
|
||||
pub mod asyncjob;
|
||||
mod blame;
|
||||
|
@ -2,11 +2,17 @@ use std::sync::{Arc, Condvar, Mutex};
|
||||
|
||||
/// combines a `Mutex` and `Condvar` to allow waiting for a change in the variable protected by the `Mutex`
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct NotifyableMutex<T> {
|
||||
pub struct NotifyableMutex<T>
|
||||
where
|
||||
T: Send + Sync,
|
||||
{
|
||||
data: Arc<(Mutex<T>, Condvar)>,
|
||||
}
|
||||
|
||||
impl<T> NotifyableMutex<T> {
|
||||
impl<T> NotifyableMutex<T>
|
||||
where
|
||||
T: Send + Sync,
|
||||
{
|
||||
///
|
||||
pub fn new(start_value: T) -> Self {
|
||||
Self {
|
||||
@ -23,6 +29,7 @@ impl<T> NotifyableMutex<T> {
|
||||
while *data != condition {
|
||||
data = self.data.1.wait(data).expect("wait err");
|
||||
}
|
||||
drop(data);
|
||||
}
|
||||
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user