From e498e2268976c348fabfa0f962c34c6ad90e3d02 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 23 Sep 2022 08:17:01 +0000 Subject: [PATCH] Rename `MultiThreadedLockableScoreLock` `MultiThreadedLockedScore` as the first is quite a mouthful, and the second isn't materially less specific. --- lightning/src/routing/scoring.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index 1521982c0..ad0852b08 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -189,9 +189,9 @@ pub struct MultiThreadedLockableScore { } #[cfg(c_bindings)] /// A locked `MultiThreadedLockableScore`. -pub struct MultiThreadedLockableScoreLock<'a, S: Score>(MutexGuard<'a, S>); +pub struct MultiThreadedScoreLock<'a, S: Score>(MutexGuard<'a, S>); #[cfg(c_bindings)] -impl<'a, T: Score + 'a> Score for MultiThreadedLockableScoreLock<'a, T> { +impl<'a, T: Score + 'a> Score for MultiThreadedScoreLock<'a, T> { fn channel_penalty_msat(&self, scid: u64, source: &NodeId, target: &NodeId, usage: ChannelUsage) -> u64 { self.0.channel_penalty_msat(scid, source, target, usage) } @@ -209,7 +209,7 @@ impl<'a, T: Score + 'a> Score for MultiThreadedLockableScoreLock<'a, T> { } } #[cfg(c_bindings)] -impl<'a, T: Score + 'a> Writeable for MultiThreadedLockableScoreLock<'a, T> { +impl<'a, T: Score + 'a> Writeable for MultiThreadedScoreLock<'a, T> { fn write(&self, writer: &mut W) -> Result<(), io::Error> { self.0.write(writer) } @@ -217,10 +217,10 @@ impl<'a, T: Score + 'a> Writeable for MultiThreadedLockableScoreLock<'a, T> { #[cfg(c_bindings)] impl<'a, T: Score + 'a> LockableScore<'a> for MultiThreadedLockableScore { - type Locked = MultiThreadedLockableScoreLock<'a, T>; + type Locked = MultiThreadedScoreLock<'a, T>; - fn lock(&'a self) -> MultiThreadedLockableScoreLock<'a, T> { - MultiThreadedLockableScoreLock(Mutex::lock(&self.score).unwrap()) + fn lock(&'a self) -> MultiThreadedScoreLock<'a, T> { + MultiThreadedScoreLock(Mutex::lock(&self.score).unwrap()) } } -- 2.39.5