summaryrefslogtreecommitdiff
path: root/cli/lsp/sources.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2021-09-24 11:10:42 -0400
committerGitHub <noreply@github.com>2021-09-24 11:10:42 -0400
commit01da1d0adc0d09d60eb765ac583be8108eb31e36 (patch)
tree21819769192f9b86c0c95f8a1bdcc911ceb2bd7b /cli/lsp/sources.rs
parent703ca905fd2ddd1860d704bf43aa66679a47a1e5 (diff)
refactor: Rename ProgramState to ProcState (#12204)
Move Arc into struct
Diffstat (limited to 'cli/lsp/sources.rs')
-rw-r--r--cli/lsp/sources.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/cli/lsp/sources.rs b/cli/lsp/sources.rs
index d453c6972..bd5835cf2 100644
--- a/cli/lsp/sources.rs
+++ b/cli/lsp/sources.rs
@@ -14,7 +14,7 @@ use crate::flags::Flags;
use crate::http_cache;
use crate::http_cache::HttpCache;
use crate::module_graph::GraphBuilder;
-use crate::program_state::ProgramState;
+use crate::proc_state::ProcState;
use crate::specifier_handler::FetchHandler;
use crate::text_encoding;
use import_map::ImportMap;
@@ -40,15 +40,13 @@ pub async fn cache(
maybe_config_file: &Option<ConfigFile>,
maybe_cache_path: &Option<PathBuf>,
) -> Result<(), AnyError> {
- let program_state = Arc::new(
- ProgramState::build(Flags {
- cache_path: maybe_cache_path.clone(),
- ..Default::default()
- })
- .await?,
- );
+ let ps = ProcState::build(Flags {
+ cache_path: maybe_cache_path.clone(),
+ ..Default::default()
+ })
+ .await?;
let handler = Arc::new(Mutex::new(FetchHandler::new(
- &program_state,
+ &ps,
Permissions::allow_all(),
Permissions::allow_all(),
)?));