mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
feat: add API example (#317)
This commit is contained in:
committed by
GitHub
parent
be1c775b8d
commit
5015132ece
@@ -46,8 +46,8 @@ impl<R: Runtime> Shell<R> {
|
||||
/// Open a (url) path with a default or specific browser opening program.
|
||||
///
|
||||
/// See [`crate::api::shell::open`] for how it handles security-related measures.
|
||||
pub fn open(&self, path: String, with: Option<open::Program>) -> Result<()> {
|
||||
open::open(&self.scope, path, with).map_err(Into::into)
|
||||
pub fn open(&self, path: impl Into<String>, with: Option<open::Program>) -> Result<()> {
|
||||
open::open(&self.scope, path.into(), with).map_err(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user