Преглед изворни кода

Remov some ?Sized bounds

See https://github.com/rust-lang/rust/pull/23316
Simon Sapin пре 11 година
родитељ
комит
245b929a0f
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/lib.rs

+ 2 - 2
src/lib.rs

@@ -479,7 +479,7 @@ impl Url {
     ///
     /// This returns `Err` if the given path is not absolute
     /// or, with a Windows path, if the prefix is not a disk prefix (e.g. `C:`).
-    pub fn from_file_path<P: AsPath + ?Sized>(path: &P) -> Result<Url, ()> {
+    pub fn from_file_path<P: AsPath>(path: P) -> Result<Url, ()> {
         let path = try!(path_to_file_url_path(path.as_path()));
         Ok(Url::from_path_common(path))
     }
@@ -501,7 +501,7 @@ impl Url {
     ///   as the base URL is `file:///var/index.html`, which might not be what was intended.
     ///
     /// (Note that `Path::new` removes any trailing slash.)
-    pub fn from_directory_path<P: AsPath + ?Sized>(path: &P) -> Result<Url, ()> {
+    pub fn from_directory_path<P: AsPath>(path: P) -> Result<Url, ()> {
         let mut path = try!(path_to_file_url_path(path.as_path()));
         // Add an empty path component (i.e. a trailing slash in serialization)
         // so that the entire path is used as a base URL.