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=186df43a6bb126b07fbea595d51e5af5a4ec5270;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 b7aa996ce..bf02271d2 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -247,12 +247,10 @@ impl ReadableArgs 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 @@ -503,7 +501,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. ///