Skip to content

Commit

Permalink
Merge pull request #108 from jmmv/drop-mountpoint-ref
Browse files Browse the repository at this point in the history
Remove mountpoint reference from {,spawn_}mount()
  • Loading branch information
zargony authored Aug 7, 2018
2 parents 5a1a418 + 273de37 commit 9ad6783
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ fn main() {
.iter()
.map(|o| o.as_ref())
.collect::<Vec<&OsStr>>();
fuse::mount(HelloFS, &mountpoint, &options).unwrap();
fuse::mount(HelloFS, mountpoint, &options).unwrap();
}
2 changes: 1 addition & 1 deletion examples/null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ impl Filesystem for NullFS {}
fn main() {
env_logger::init();
let mountpoint = env::args_os().nth(1).unwrap();
fuse::mount(NullFS, &mountpoint, &[]).unwrap();
fuse::mount(NullFS, mountpoint, &[]).unwrap();
}
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ pub trait Filesystem {
///
/// Note that you need to lead each option with a separate `"-o"` string. See
/// `examples/hello.rs`.
pub fn mount<FS: Filesystem, P: AsRef<Path>>(filesystem: FS, mountpoint: &P, options: &[&OsStr]) -> io::Result<()>{
pub fn mount<FS: Filesystem, P: AsRef<Path>>(filesystem: FS, mountpoint: P, options: &[&OsStr]) -> io::Result<()>{
Session::new(filesystem, mountpoint.as_ref(), options).and_then(|mut se| se.run())
}

Expand All @@ -384,6 +384,6 @@ pub fn mount<FS: Filesystem, P: AsRef<Path>>(filesystem: FS, mountpoint: &P, opt
/// and therefore returns immediately. The returned handle should be stored
/// to reference the mounted filesystem. If it's dropped, the filesystem will
/// be unmounted.
pub unsafe fn spawn_mount<'a, FS: Filesystem+Send+'a, P: AsRef<Path>>(filesystem: FS, mountpoint: &P, options: &[&OsStr]) -> io::Result<BackgroundSession<'a>> {
pub unsafe fn spawn_mount<'a, FS: Filesystem+Send+'a, P: AsRef<Path>>(filesystem: FS, mountpoint: P, options: &[&OsStr]) -> io::Result<BackgroundSession<'a>> {
Session::new(filesystem, mountpoint.as_ref(), options).and_then(|se| se.spawn())
}

0 comments on commit 9ad6783

Please sign in to comment.