Merge #10423
10423: Internal: refactor for mdbook plugin r=Veykril a=HKalbasi This PR is for upstreaming changes that I made for mdbook plugin. Changes are adding inlay hints to `StaticIndex` and changing some functions for working around privacy of crates. Aside this, is it okay if I bring the plugin in tree? It is a simple binary crate. I feel it will better maintained here and become resistant to api changes. Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
This commit is contained in:
@@ -25,6 +25,12 @@ impl VfsPath {
|
||||
VfsPath(VfsPathRepr::VirtualPath(VirtualPath(path)))
|
||||
}
|
||||
|
||||
/// Create a path from string. Input should be a string representation of
|
||||
/// an absolute path inside filesystem
|
||||
pub fn new_real_path(path: String) -> VfsPath {
|
||||
VfsPath::from(AbsPathBuf::assert(path.into()))
|
||||
}
|
||||
|
||||
/// Returns the `AbsPath` representation of `self` if `self` is on the file system.
|
||||
pub fn as_path(&self) -> Option<&AbsPath> {
|
||||
match &self.0 {
|
||||
|
||||
Reference in New Issue
Block a user