Skip to content

Commit

Permalink
fix nightly builds
Browse files Browse the repository at this point in the history
* update proc-macro2
* fix new warnings
  • Loading branch information
extrawurst committed Jul 7, 2023
1 parent 05ce018 commit cb9cf3a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion asyncgit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 9 additions & 2 deletions src/notify_mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -23,6 +29,7 @@ impl<T> NotifyableMutex<T> {
while *data != condition {
data = self.data.1.wait(data).expect("wait err");
}
drop(data);
}

///
Expand Down

0 comments on commit cb9cf3a

Please sign in to comment.