mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-30 22:02:43 -08:00
fix: resolve clippy errors from cargo dependency bumps
This commit is contained in:
3 files changed
+18
-18
No files matched your search
@@ -280,7 +280,7 @@ fn appindicator_available() -> bool {
|
||||
];
|
||||
CANDIDATES
|
||||
.iter()
|
||||
.any(|name| unsafe { libloading::Library::new(name) }.is_ok())
|
||||
.any(|name| unsafe { libloading::Library::new(*name) }.is_ok())
|
||||
}
|
||||
|
||||
pub fn create_system_tray(app: &AppHandle<crate::BrowserEngine>) -> tauri::Result<()> {
|
||||
|
||||
@@ -7,12 +7,12 @@ use std::{
|
||||
|
||||
use base64::Engine;
|
||||
use futures_util::StreamExt;
|
||||
use serde::Serialize;
|
||||
use tauri::{ipc::Channel, AppHandle, Manager, Runtime};
|
||||
use tauri_plugin_http::reqwest::{
|
||||
use reqwest::{
|
||||
header::{AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE},
|
||||
Body, Client, ClientBuilder, Method, Url,
|
||||
};
|
||||
use serde::Serialize;
|
||||
use tauri::{ipc::Channel, AppHandle, Manager, Runtime};
|
||||
use tokio::{
|
||||
fs::{File, OpenOptions},
|
||||
io::AsyncWriteExt,
|
||||
|
||||
+14
-14
@@ -11,20 +11,20 @@ pub fn init() -> Option<sentry::ClientInitGuard> {
|
||||
let environment = option_env!("SENTRY_ENVIRONMENT");
|
||||
let release = option_env!("SENTRY_APP_VERSION").map(|v| format!("sable@{v}"));
|
||||
|
||||
let guard = sentry::init(sentry::ClientOptions {
|
||||
dsn: dsn.parse().ok(),
|
||||
release: release.map(Into::into),
|
||||
environment: environment.map(Into::into),
|
||||
send_default_pii: false,
|
||||
before_send: Some(std::sync::Arc::new(|event: Event<'static>| {
|
||||
if CONSENT.load(Ordering::Relaxed) {
|
||||
Some(event)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})),
|
||||
..Default::default()
|
||||
});
|
||||
// ClientOptions is #[non_exhaustive]; mutate a default instance instead.
|
||||
let mut options = sentry::ClientOptions::default();
|
||||
options.dsn = dsn.parse().ok();
|
||||
options.release = release.map(Into::into);
|
||||
options.environment = environment.map(Into::into);
|
||||
options.send_default_pii = false;
|
||||
options.before_send = Some(std::sync::Arc::new(|event: Event<'static>| {
|
||||
if CONSENT.load(Ordering::Relaxed) {
|
||||
Some(event)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}));
|
||||
let guard = sentry::init(options);
|
||||
|
||||
Some(guard)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user