mirror of
https://github.com/Drop-OSS/wry-cef.git
synced 2026-01-30 20:55:24 +01:00
fix: clippy io_other_error errors (#1647)
This commit is contained in:
5
.changes/fix-clippy-io_other_error.md
Normal file
5
.changes/fix-clippy-io_other_error.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"wry": patch
|
||||
---
|
||||
|
||||
Fix clippy io_other_error. No user facing changes.
|
||||
@@ -1263,28 +1263,24 @@ pub fn platform_webview_version() -> Result<String> {
|
||||
unsafe {
|
||||
let Some(bundle) = NSBundle::bundleWithIdentifier(&NSString::from_str("com.apple.WebKit"))
|
||||
else {
|
||||
return Err(Error::Io(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
return Err(Error::Io(std::io::Error::other(
|
||||
"failed to locate com.apple.WebKit bundle",
|
||||
)));
|
||||
};
|
||||
let Some(dict) = bundle.infoDictionary() else {
|
||||
return Err(Error::Io(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
return Err(Error::Io(std::io::Error::other(
|
||||
"failed to get WebKit info dictionary",
|
||||
)));
|
||||
};
|
||||
|
||||
let Some(webkit_version) = dict.objectForKey(&NSString::from_str("CFBundleVersion")) else {
|
||||
return Err(Error::Io(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
return Err(Error::Io(std::io::Error::other(
|
||||
"failed to get WebKit version",
|
||||
)));
|
||||
};
|
||||
|
||||
let Ok(webkit_version) = webkit_version.downcast::<NSString>() else {
|
||||
return Err(Error::Io(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
return Err(Error::Io(std::io::Error::other(
|
||||
"failed to parse WebKit version",
|
||||
)));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user