build: Update pnpm to v9 (#1309)

* build: Update pnpm to v9

* update actions

* remove last actions-rs usage

* clippy

* clippy again

* revert default feature
This commit is contained in:
Fabian-Lars
2024-05-13 17:03:04 +02:00
committed by GitHub
parent ecda84f8d5
commit 0d4d029011
23 changed files with 3413 additions and 2656 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ struct Http<R: Runtime> {
app: AppHandle<R>,
}
trait HttpExt<R: Runtime> {
/* trait HttpExt<R: Runtime> {
fn http(&self) -> &Http<R>;
}
@@ -31,7 +31,7 @@ impl<R: Runtime, T: Manager<R>> HttpExt<R> for T {
fn http(&self) -> &Http<R> {
self.state::<Http<R>>().inner()
}
}
} */
pub fn init<R: Runtime>() -> TauriPlugin<R> {
Builder::<R>::new("http")
@@ -48,7 +48,7 @@ pub enum Hint {
/// * <https://developer.gnome.org/notification-spec/#categories>
Category(String),
/// Name of the DesktopEntry representing the calling application. In case of "firefox.desktop"
/// Name of the `DesktopEntry` representing the calling application. In case of "firefox.desktop"
/// use "firefox". May be used to retrieve the correct icon.
DesktopEntry(String),
@@ -91,7 +91,7 @@ pub enum Hint {
/// A custom numerical (integer) hint
CustomInt(String, i32),
/// Only used by this NotificationServer implementation
/// Only used by this `NotificationServer` implementation
Invalid // TODO find a better solution to this
}
@@ -154,7 +154,7 @@ fn test_hints_to_map() {
// custom value should only be there once if the names are identical
let n1 = super::Notification::new()
let n1 = Notification::new()
.hint(Hint::Custom("foo".into(), "bar1".into()))
.hint(Hint::Custom("foo".into(), "bar2".into()))
.hint(Hint::Custom("f00".into(), "bar3".into()))
@@ -1,17 +1,16 @@
#![allow(dead_code)]
pub const ACTION_ICONS: &str = "action-icons";
pub const CATEGORY: &str = "category";
pub const DESKTOP_ENTRY: &str = "desktop-entry";
pub const IMAGE_PATH: &str = "image-path";
pub const RESIDENT: &str = "resident";
pub const SOUND_FILE: &str = "sound-file";
pub const SOUND_NAME: &str = "sound-name";
pub const SUPPRESS_SOUND: &str = "suppress-sound";
pub const TRANSIENT: &str = "transient";
pub const X: &str = "x";
pub const Y: &str = "y";
pub const URGENCY: &str = "urgency";
pub const ACTION_ICONS: &str = "action-icons";
pub const CATEGORY: &str = "category";
pub const DESKTOP_ENTRY: &str = "desktop-entry";
pub const IMAGE_PATH: &str = "image-path";
pub const RESIDENT: &str = "resident";
pub const SOUND_FILE: &str = "sound-file";
pub const SOUND_NAME: &str = "sound-name";
pub const SUPPRESS_SOUND: &str = "suppress-sound";
pub const TRANSIENT: &str = "transient";
pub const X: &str = "x";
pub const Y: &str = "y";
pub const URGENCY: &str = "urgency";
pub const INVALID: &str = "invalid";
pub const INVALID: &str = "invalid";
@@ -1,12 +1,11 @@
#![cfg(all(test, unix, not(target_os = "macos")))]
use dbus::arg::messageitem::MessageItem as Item;
use ctor::ctor;
use dbus::arg::messageitem::MessageItem as Item;
use super::*;
use self::Hint as Hint;
use self::Hint;
use super::Urgency::*;
use super::*;
#[ctor]
fn init_color_backtrace() {
@@ -61,12 +60,14 @@ fn imagedata_hint_to_item() {
Item::Bool(false),
Item::Int32(8),
Item::Int32(3),
Item::Array(dbus::MessageItemArray::new(vec![
Item::Byte(0),
Item::Byte(0),
Item::Byte(0),
],"ay".into()).unwrap())
]))))
Item::Array(
dbus::MessageItemArray::new(
vec![Item::Byte(0), Item::Byte(0), Item::Byte(0)],
"ay".into(),
)
.unwrap(),
),
])))),
);
assert_eq!(item, test_item);
}
@@ -116,7 +116,7 @@ impl Notification {
/// # Platform Support
/// Please note that this method has no effect on macOS. Here you can only set the application via [`set_application()`](fn.set_application.html)
pub fn appname(&mut self, appname: &str) -> &mut Notification {
self.appname = appname.to_owned();
appname.clone_into(&mut self.appname);
self
}
@@ -124,7 +124,7 @@ impl Notification {
///
/// Often acts as title of the notification. For more elaborate content use the `body` field.
pub fn summary(&mut self, summary: &str) -> &mut Notification {
self.summary = summary.to_owned();
summary.clone_into(&mut self.summary);
self
}
@@ -195,7 +195,7 @@ impl Notification {
/// Each line should be treated as a paragraph.
/// Simple html markup should be supported, depending on the server implementation.
pub fn body(&mut self, body: &str) -> &mut Notification {
self.body = body.to_owned();
body.clone_into(&mut self.body);
self
}
@@ -208,7 +208,7 @@ impl Notification {
/// # Platform support
/// macOS does not have support manually setting the icon. However you can pretend to be another app using [`set_application()`](fn.set_application.html)
pub fn icon(&mut self, icon: &str) -> &mut Notification {
self.icon = icon.to_owned();
icon.clone_into(&mut self.icon);
self
}
@@ -390,8 +390,8 @@ impl Notification {
#[cfg(feature = "async")]
// #[cfg(test)]
pub async fn show_async_at_bus(&self, sub_bus: &str) -> Result<xdg::NotificationHandle> {
let bus = super::xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?;
super::xdg::show_notification_async_at_bus(self, bus).await
let bus = xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?;
xdg::show_notification_async_at_bus(self, bus).await
}
/// Sends Notification to `NSUserNotificationCenter`.
+2 -2
View File
@@ -95,7 +95,7 @@ impl<R: Runtime> StoreBuilder<R> {
/// # Ok(())
/// # }
pub fn defaults(mut self, defaults: HashMap<String, JsonValue>) -> Self {
self.cache = defaults.clone();
self.cache.clone_from(&defaults);
self.defaults = Some(defaults);
self
}
@@ -263,7 +263,7 @@ impl<R: Runtime> Store<R> {
);
}
}
self.cache = defaults.clone();
self.cache.clone_from(defaults);
}
Ok(())
} else {
+3 -3
View File
@@ -65,10 +65,10 @@ pub(crate) async fn check<R: Runtime>(
let mut metadata = Metadata::default();
if let Some(update) = update {
metadata.available = true;
metadata.current_version = update.current_version.clone();
metadata.version = update.version.clone();
metadata.current_version.clone_from(&update.current_version);
metadata.version.clone_from(&update.version);
metadata.date = update.date.map(|d| d.to_string());
metadata.body = update.body.clone();
metadata.body.clone_from(&update.body);
metadata.rid = Some(webview.resources_table().add(update));
}