From 2d210c07b329cdfba410035af25e37b114adab11 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 1 Mar 2022 03:47:28 +0000 Subject: [PATCH] Simplify type aliasing somewhat around times .. as the current C bindings generator isn't capable of handling type aliases in generics in type alias definition currently. --- lightning/src/routing/scoring.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index dfda3d2f..6b399dec 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -232,12 +232,10 @@ impl Score for FixedPenaltyScorer { since = "0.0.105", note = "ProbabilisticScorer should be used instead of Scorer.", )] -pub type Scorer = ScorerUsingTime::; - #[cfg(not(feature = "no-std"))] -type ConfiguredTime = std::time::Instant; +pub type Scorer = ScorerUsingTime::; #[cfg(feature = "no-std")] -type ConfiguredTime = time::Eternity; +pub type Scorer = ScorerUsingTime::; // Note that ideally we'd hide ScorerUsingTime from public view by sealing it as well, but rustdoc // doesn't handle this well - instead exposing a `Scorer` which has no trait implementation(s) or @@ -487,7 +485,10 @@ impl Readable for ChannelFailure { /// behavior. /// /// [1]: https://arxiv.org/abs/2107.05322 -pub type ProbabilisticScorer = ProbabilisticScorerUsingTime::; +#[cfg(not(feature = "no-std"))] +pub type ProbabilisticScorer = ProbabilisticScorerUsingTime::; +#[cfg(feature = "no-std")] +pub type ProbabilisticScorer = ProbabilisticScorerUsingTime::; /// Probabilistic [`Score`] implementation. /// -- 2.30.2