feat: add API example (#317)

This commit is contained in:
Lucas Fernandes Nogueira
2023-05-05 05:41:17 -07:00
committed by GitHub
parent be1c775b8d
commit 5015132ece
98 changed files with 10334 additions and 156 deletions
+2 -2
View File
@@ -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)
}
}