diff options
author | Leonardo Yvens <leoyvens@gmail.com> | 2016-12-23 17:53:35 -0200 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2016-12-23 14:53:35 -0500 |
commit | dd5ded2f78145755208043db1027cdb85ac9fd5a (patch) | |
tree | 4a4541ba35332fb7e9af9d7b26ec17bf3602b2cc /src/pathutil.rs | |
parent | cbacf4f19ea3a73f04070d942b217b333cf88e67 (diff) |
fix some clippy lints (#288)
Diffstat (limited to 'src/pathutil.rs')
-rw-r--r-- | src/pathutil.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathutil.rs b/src/pathutil.rs index 085c9dbc..8d1c1510 100644 --- a/src/pathutil.rs +++ b/src/pathutil.rs @@ -1,6 +1,6 @@ /*! The pathutil module provides platform specific operations on paths that are -typically faster than the same operations as provided in std::path. In +typically faster than the same operations as provided in `std::path`. In particular, we really want to avoid the costly operation of parsing the path into its constituent components. We give up on Windows, but on Unix, we deal with the raw bytes directly. @@ -26,7 +26,7 @@ pub fn strip_prefix<'a, P: AsRef<Path> + ?Sized>( if prefix.len() > path.len() || prefix != &path[0..prefix.len()] { None } else { - Some(&Path::new(OsStr::from_bytes(&path[prefix.len()..]))) + Some(Path::new(OsStr::from_bytes(&path[prefix.len()..]))) } } |