Skip to content

Commit c589d57

Browse files
committed
Modify type of parameter 'path' in Gio.Vfs.get_file_for_path to 'filename'
Signed-off-by: fbrouille <fbrouille@users.noreply.github.com>
1 parent b5f93cb commit c589d57

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

gio/Gir.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,11 @@ cfg_condition = "unix"
17401740
name = "Gio.Vfs"
17411741
status = "generate"
17421742
concurrency = "send+sync"
1743+
[[object.function]]
1744+
name = "get_file_for_path"
1745+
[[object.function.parameter]]
1746+
name = "path"
1747+
string_type = "filename"
17431748

17441749
[[object]]
17451750
name = "Gio.Volume"

gio/src/auto/vfs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ unsafe impl Sync for Vfs {}
3838
pub trait VfsExt: IsA<Vfs> + 'static {
3939
#[doc(alias = "g_vfs_get_file_for_path")]
4040
#[doc(alias = "get_file_for_path")]
41-
fn file_for_path(&self, path: &str) -> File {
41+
fn file_for_path(&self, path: impl AsRef<std::path::Path>) -> File {
4242
unsafe {
4343
from_glib_full(ffi::g_vfs_get_file_for_path(
4444
self.as_ref().to_glib_none().0,
45-
path.to_glib_none().0,
45+
path.as_ref().to_glib_none().0,
4646
))
4747
}
4848
}

0 commit comments

Comments
 (0)