Skip to content

Commit 21ebc6e

Browse files
authored
feat(tauri): remove 'static lifetime bound from AppHandle::remove_plugin (#14007)
1 parent 2d5f5a9 commit 21ebc6e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tauri: minor:enhance
3+
---
4+
5+
Changed the parameter type of `AppHandle::remove_plugin` from `&'static str` to `&str`.

crates/tauri/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ impl<R: Runtime> AppHandle<R> {
526526
/// Ok(())
527527
/// });
528528
/// ```
529-
pub fn remove_plugin(&self, plugin: &'static str) -> bool {
529+
pub fn remove_plugin(&self, plugin: &str) -> bool {
530530
self.manager().plugins.lock().unwrap().unregister(plugin)
531531
}
532532

crates/tauri/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ impl<R: Runtime> PluginStore<R> {
886886
}
887887

888888
/// Removes the plugin with the given name from the store.
889-
pub fn unregister(&mut self, plugin: &'static str) -> bool {
889+
pub fn unregister(&mut self, plugin: &str) -> bool {
890890
let len = self.store.len();
891891
self.store.retain(|p| p.name() != plugin);
892892
len != self.store.len()

0 commit comments

Comments
 (0)