From: Matt Corallo Date: Tue, 1 Mar 2022 03:47:28 +0000 (+0000) Subject: Simplify type aliasing somewhat around times X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=2d210c07b329cdfba410035af25e37b114adab11;p=rust-lightning 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. --- diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index dfda3d2f8..6b399dec6 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. ///