Move turns to a submodule of std (#6039)

* Move turns to a submodule of std

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Cache module infos as well as memory; fix a bug with deprecated constants

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-03-30 11:10:44 +13:00
committed by GitHub
parent 51c16d0048
commit db5ce7ba85
56 changed files with 2678 additions and 2637 deletions

View File

@ -1635,7 +1635,7 @@ fn position_to_char_index(position: Position, code: &str) -> usize {
async fn with_cached_var<T>(name: &str, f: impl Fn(&KclValue) -> T) -> Option<T> {
let mem = cache::read_old_memory().await?;
let value = mem.get(name, SourceRange::default()).ok()?;
let value = mem.0.get(name, SourceRange::default()).ok()?;
Some(f(value))
}