feat(tvix/eval): context-aware baseNameOf
Change-Id: I9f0a8143070805b85276f721bdfbdf7ede2cf615 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10421 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
This commit is contained in:
parent
e15b6580cc
commit
db748741da
1 changed files with 5 additions and 2 deletions
|
@ -161,9 +161,12 @@ mod pure_builtins {
|
|||
span,
|
||||
)
|
||||
.await?
|
||||
.to_str()?,
|
||||
.to_contextful_str()?,
|
||||
};
|
||||
let result: String = s.rsplit_once('/').map(|(_, x)| x).unwrap_or(&s).into();
|
||||
let result: NixString = NixString::new_inherit_context_from(
|
||||
&s,
|
||||
s.rsplit_once('/').map(|(_, x)| x).unwrap_or(&s),
|
||||
);
|
||||
Ok(result.into())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue