mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-03 18:30:41 +08:00
16 lines
416 B
Rust
16 lines
416 B
Rust
use radicle::node::device::Device;
|
|
use radicle::patch::{Patch, Review, ReviewId, Revision};
|
|
|
|
pub mod issue;
|
|
|
|
pub fn find_review<'a, G>(
|
|
patch: &'a Patch,
|
|
revision: &Revision,
|
|
signer: &Device<G>,
|
|
) -> Option<(ReviewId, &'a Review)> {
|
|
patch
|
|
.reviews_of(revision.id())
|
|
.find(|(_, review)| review.author().public_key() == signer.public_key())
|
|
.map(|(id, review)| (*id, review))
|
|
}
|