Merge pull request #1740 from TheBlueMatt/2022-09-invoice-bindings-nostd
[rust-lightning] / lightning-invoice / src / utils.rs
index d26be35fb39898cc0665b0e90388a36cbcdde397..d7185c999ee4356cd8f755cc2f319c986e3950bc 100644 (file)
@@ -483,20 +483,20 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref> Router for DefaultR
                )
        }
 
-       fn notify_payment_path_failed(&self, path: Vec<&RouteHop>, short_channel_id: u64) {
-               self.scorer.lock().payment_path_failed(&path, short_channel_id);
+       fn notify_payment_path_failed(&self, path: &[&RouteHop], short_channel_id: u64) {
+               self.scorer.lock().payment_path_failed(path, short_channel_id);
        }
 
-       fn notify_payment_path_successful(&self, path: Vec<&RouteHop>) {
-               self.scorer.lock().payment_path_successful(&path);
+       fn notify_payment_path_successful(&self, path: &[&RouteHop]) {
+               self.scorer.lock().payment_path_successful(path);
        }
 
-       fn notify_payment_probe_successful(&self, path: Vec<&RouteHop>) {
-               self.scorer.lock().probe_successful(&path);
+       fn notify_payment_probe_successful(&self, path: &[&RouteHop]) {
+               self.scorer.lock().probe_successful(path);
        }
 
-       fn notify_payment_probe_failed(&self, path: Vec<&RouteHop>, short_channel_id: u64) {
-               self.scorer.lock().probe_failed(&path, short_channel_id);
+       fn notify_payment_probe_failed(&self, path: &[&RouteHop], short_channel_id: u64) {
+               self.scorer.lock().probe_failed(path, short_channel_id);
        }
 }
 
@@ -559,7 +559,7 @@ impl<'a, S: Score> ScorerAccountingForInFlightHtlcs<'a, S> {
 
 #[cfg(c_bindings)]
 impl<'a, S:Score> lightning::util::ser::Writeable for ScorerAccountingForInFlightHtlcs<'a, S> {
-       fn write<W: lightning::util::ser::Writer>(&self, writer: &mut W) -> Result<(), std::io::Error> { self.scorer.write(writer) }
+       fn write<W: lightning::util::ser::Writer>(&self, writer: &mut W) -> Result<(), lightning::io::Error> { self.scorer.write(writer) }
 }
 
 impl<'a, S: Score> Score for ScorerAccountingForInFlightHtlcs<'a, S> {