mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-20 12:35:40 +00:00
Rename to SessionSnapshot, move unwind assertion closer (#19177)
This PR addresses the post-merge review comments from https://github.com/astral-sh/ruff/pull/19041, specifically it: - Rename `WorkspaceSnapshot` to `SessionSnapshot` - Rename `take_workspace_snapshot` to `take_session_snapshot` - Rename `take_snapshot` to `take_document_snapshot` - Move `AssertUnwindSafe` closer to the `catch_unwind` call which requires the assertion
This commit is contained in:
parent
1fd48120ba
commit
8cf1b876ee
5 changed files with 28 additions and 22 deletions
|
|
@ -80,7 +80,7 @@ pub(super) fn publish_diagnostics(
|
|||
let path = key.path();
|
||||
|
||||
let snapshot = session
|
||||
.take_snapshot(url.clone())
|
||||
.take_document_snapshot(url.clone())
|
||||
.ok_or_else(|| anyhow::anyhow!("Unable to take snapshot for document with URL {url}"))
|
||||
.with_failure_code(lsp_server::ErrorCode::InternalError)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue