document SourceId::from_cwd
authorDale Wijnand <dale.wijnand@gmail.com>
Tue, 10 Apr 2018 05:48:00 +0000 (06:48 +0100)
committerDale Wijnand <dale.wijnand@gmail.com>
Tue, 10 Apr 2018 05:48:00 +0000 (06:48 +0100)
src/cargo/core/source/source_id.rs

index 96f5ff6607737f4b1a2a47431695dfabf058b143..7bf6e63fca1a9efba5b9df6719691562ec6a5c1b 100644 (file)
@@ -167,6 +167,9 @@ impl SourceId {
         SourceId::new(Kind::Directory, url)
     }
 
+    /// Create a SourceId from the current working directory filesystem path.
+    ///
+    /// Pass absolute path
     pub fn from_cwd(path: &Path) -> CargoResult<SourceId> {
         let url = path.to_url()?;
         Ok(SourceId {