Skip to content

Commit 261768a

Browse files
committed
rust updates
- cargo update - feature updates - Change AsPath to AsRef<Path> Still aborts on src/lib.rs, rust-lang/rust#23649
1 parent db151bc commit 261768a

File tree

3 files changed

+49
-49
lines changed

3 files changed

+49
-49
lines changed

Cargo.lock

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ test = false
1414
doc = false
1515

1616
[dependencies]
17-
fuse = "0"
17+
#fuse = "0"
1818
git2 = "0"
1919
probe = "0"
2020
time = "0"
2121

22-
#[dependencies.fuse]
23-
#git = "https://github.com/zargony/rust-fuse"
22+
[dependencies.fuse]
23+
git = "https://github.com/zargony/rust-fuse"

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! # GitFS: a FUSE filesystem for Git objects
1010
1111
#![feature(asm)]
12-
#![feature(core)]
12+
#![feature(convert)]
1313
#![feature(libc)]
1414
#![feature(std_misc)]
1515

@@ -30,7 +30,7 @@ use std::default::Default;
3030
use std::ffi::{OsString, AsOsStr};
3131
use std::os::unix::ffi::OsStrExt;
3232
use std::fs;
33-
use std::path::{AsPath, Path, PathBuf};
33+
use std::path::{Path, PathBuf};
3434
use std::u64;
3535

3636
use inode::{Id, InodeContainer, InodeMapper};
@@ -76,26 +76,26 @@ impl GitFS {
7676
}
7777

7878
fn mount_options(&self) -> OsString {
79-
let mut options = OsString::from_str("-oro,default_permissions,fsname=");
79+
let mut options = OsString::from("-oro,default_permissions,fsname=");
8080
options.push(&self.repo.path()); // FIXME escape commas?
8181
options
8282
}
8383

8484
/// Mount the filesystem and wait until the path is unmounted, e.g. with the command
8585
/// `fusermount -u PATH`.
86-
pub fn mount<P: AsPath>(mut self, mountpoint: &P) {
86+
pub fn mount<P: AsRef<Path>>(mut self, mountpoint: &P) {
8787
// Create/remove the mount point if it doesn't exist
88-
self.mountdir = DirHandle::new(mountpoint.as_path());
88+
self.mountdir = DirHandle::new(mountpoint.as_ref());
8989

9090
let options = self.mount_options();
9191
fuse::mount(self, mountpoint, &[&options])
9292
}
9393

9494
/// Mount the filesystem in the background. It will remain mounted until the returned session
9595
/// object is dropped, or an external umount is issued.
96-
pub fn spawn_mount<P: AsPath>(mut self, mountpoint: &P) -> std::io::Result<fuse::BackgroundSession> {
96+
pub fn spawn_mount<P: AsRef<Path>>(mut self, mountpoint: &P) -> std::io::Result<fuse::BackgroundSession> {
9797
// Create/remove the mount point if it doesn't exist
98-
self.mountdir = DirHandle::new(mountpoint.as_path());
98+
self.mountdir = DirHandle::new(mountpoint.as_ref());
9999

100100
let options = self.mount_options();
101101
fuse::spawn_mount(self, mountpoint, &[&options])

0 commit comments

Comments
 (0)