Skip to content

Commit cb9cf3a

Browse files
committed
fix nightly builds
* update proc-macro2 * fix new warnings
1 parent 05ce018 commit cb9cf3a

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asyncgit/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
//TODO: get this in someday since expect still leads us to crashes sometimes
2323
// #![deny(clippy::expect_used)]
2424
//TODO: consider cleaning some up and allow specific places
25-
#![allow(clippy::significant_drop_tightening)]
25+
#![allow(
26+
clippy::significant_drop_tightening,
27+
// TODO:
28+
clippy::missing_panics_doc
29+
)]
2630

2731
pub mod asyncjob;
2832
mod blame;

src/notify_mutex.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@ use std::sync::{Arc, Condvar, Mutex};
22

33
/// combines a `Mutex` and `Condvar` to allow waiting for a change in the variable protected by the `Mutex`
44
#[derive(Clone, Debug)]
5-
pub struct NotifyableMutex<T> {
5+
pub struct NotifyableMutex<T>
6+
where
7+
T: Send + Sync,
8+
{
69
data: Arc<(Mutex<T>, Condvar)>,
710
}
811

9-
impl<T> NotifyableMutex<T> {
12+
impl<T> NotifyableMutex<T>
13+
where
14+
T: Send + Sync,
15+
{
1016
///
1117
pub fn new(start_value: T) -> Self {
1218
Self {
@@ -23,6 +29,7 @@ impl<T> NotifyableMutex<T> {
2329
while *data != condition {
2430
data = self.data.1.wait(data).expect("wait err");
2531
}
32+
drop(data);
2633
}
2734

2835
///

0 commit comments

Comments
 (0)