mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 10:18:16 +00:00
* fix: the path to join is shadowed by a local variable * fix: redact target uri
This commit is contained in:
parent
cb51d67e7d
commit
9904189910
7 changed files with 49 additions and 2 deletions
|
@ -17,6 +17,7 @@ use typst::syntax::VirtualPath;
|
|||
|
||||
use super::TypstFileId;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum PathResolution {
|
||||
Resolved(PathBuf),
|
||||
Rootless(Cow<'static, VirtualPath>),
|
||||
|
@ -39,7 +40,7 @@ impl PathResolution {
|
|||
|
||||
pub fn join(&self, path: &str) -> FileResult<PathResolution> {
|
||||
match self {
|
||||
PathResolution::Resolved(path) => Ok(PathResolution::Resolved(path.join(path))),
|
||||
PathResolution::Resolved(root) => Ok(PathResolution::Resolved(root.join(path))),
|
||||
PathResolution::Rootless(root) => {
|
||||
Ok(PathResolution::Rootless(Cow::Owned(root.join(path))))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue