From d34068c5a75d344123d7f61a5a09af14c6c08110 Mon Sep 17 00:00:00 2001 From: awiouy Date: Fri, 9 Feb 2018 20:57:49 +0100 Subject: [PATCH] core API: apresolve --- core/src/apresolve.rs | 9 ++++----- core/src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/apresolve.rs b/core/src/apresolve.rs index d137d874..bf3ba276 100644 --- a/core/src/apresolve.rs +++ b/core/src/apresolve.rs @@ -14,7 +14,7 @@ pub struct APResolveData { ap_list: Vec } -pub fn apresolve(handle: &Handle) -> Box> { +fn apresolve(handle: &Handle) -> Box> { let url = Uri::from_str(APRESOLVE_ENDPOINT).expect("invalid AP resolve URL"); let client = Client::new(handle); @@ -44,10 +44,9 @@ pub fn apresolve(handle: &Handle) -> Box> { Box::new(ap) } -pub fn apresolve_or_fallback(handle: &Handle) - -> Box> - where E: 'static -{ +pub(crate) fn apresolve_or_fallback(handle: &Handle) + -> Box> + where E: 'static { let ap = apresolve(handle).or_else(|e| { warn!("Failed to resolve Access Point: {}", e.description()); warn!("Using fallback \"{}\"", AP_FALLBACK); diff --git a/core/src/lib.rs b/core/src/lib.rs index 2f00ad39..ab7a556f 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -27,7 +27,7 @@ extern crate uuid; extern crate librespot_protocol as protocol; #[macro_use] mod component; -pub mod apresolve; +mod apresolve; pub mod audio_key; pub mod authentication; pub mod cache;