-
Notifications
You must be signed in to change notification settings - Fork 23
feat: introduce adapter config for platform-specific configuration options #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'm ok with the API breakage. I'd like to see the Linux and Windows versions of |
|
@alexmoon Ready for review. I don't have a linux/windows host to test on right now. |
src/adapter.rs
Outdated
| /// Creates an interface to the default Bluetooth adapter for the system. | ||
| #[cfg(not(target_os = "android"))] | ||
| pub async fn default() -> Result<Self> { | ||
| sys::adapter::AdapterImpl::default().await.map(Adapter) | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I wasn't clear. I want to keep this method but change it to:
pub async fn default() -> Result<Self> {
sys::adapter::AdapterImpl::with_config(AdapterConfig::default()).await.map(Adapter)
}|
@lulf are you still working on this? The clippy errors should be resolved by rebasing on main. |
Breaks the public API a bit, let me know if it should be preserved. Also I put unsafe on creating the config on android, this way the with_config on the adapter could still be the same for all platforms.