Skip to content

Commit 020347a

Browse files
committed
f tweak docs explaining why different Score
1 parent 8e17db4 commit 020347a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/routing/scoring.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ use core::ops::{DerefMut, Sub};
6363
use core::time::Duration;
6464
use io::{self, Read}; use sync::{Mutex, MutexGuard};
6565

66-
/// We define Score ever-so-slightly differently based on whether we are being build for C bindings
66+
/// We define Score ever-so-slightly differently based on whether we are being built for C bindings
6767
/// or not. For users, `LockableScore` must somehow be writeable to disk. For Rust users, this is
6868
/// no problem - you move a `Score` that implements `Writeable` into a `Mutex`, lock it, and now
6969
/// you have the original, concrete, `Score` type, which presumably implements `Writeable`.
7070
///
7171
/// For C users, once you've moved the `Score` into a `LockableScore` all you have after locking it
7272
/// is an opaque trait object with an opaque pointer with no type info. Users could take the unsafe
7373
/// approach of blindly casting that opaque pointer to a concrete type and calling `Writeable` from
74-
/// there, but downstream bindings users (e.g. Java users) can't even do that. Instead, we really
75-
/// want `Score` and `LockableScore` to implement `Writeable` directly, which we do here by
76-
/// defining `Score` differently for `cfg(c_bindings)`.
74+
/// there, but other languages downstream of the C bindings (e.g. Java) can't even do that.
75+
/// Instead, we really want `Score` and `LockableScore` to implement `Writeable` directly, which we
76+
/// do here by defining `Score` differently for `cfg(c_bindings)`.
7777
macro_rules! define_score { ($($supertrait: path)*) => {
7878
/// An interface used to score payment channels for path finding.
7979
///

0 commit comments

Comments
 (0)