Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/remove-plugin-static-constraint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri: minor:enhance
---

Changed the parameter type of `AppHandle::remove_plugin` from `&'static str` to `&str`.
2 changes: 1 addition & 1 deletion crates/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ impl<R: Runtime> AppHandle<R> {
/// Ok(())
/// });
/// ```
pub fn remove_plugin(&self, plugin: &'static str) -> bool {
pub fn remove_plugin(&self, plugin: &str) -> bool {
self.manager().plugins.lock().unwrap().unregister(plugin)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/tauri/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ impl<R: Runtime> PluginStore<R> {
}

/// Removes the plugin with the given name from the store.
pub fn unregister(&mut self, plugin: &'static str) -> bool {
pub fn unregister(&mut self, plugin: &str) -> bool {
let len = self.store.len();
self.store.retain(|p| p.name() != plugin);
len != self.store.len()
Expand Down
Loading