Commit Graph
10 Commits
Author SHA1 Message Date
Kirill Bulatov 6f2725844a Use anyhow more idiomatically (#31052)
https://github.com/zed-industries/zed/issues/30972 brought up another
case where our context is not enough to track the actual source of the
issue: we get a general top-level error without inner error.

The reason for this was `.ok_or_else(|| anyhow!("failed to read HEAD
SHA"))?; ` on the top level.

The PR finally reworks the way we use anyhow to reduce such issues (or
at least make it simpler to bubble them up later in a fix).
On top of that, uses a few more anyhow methods for better readability.

* `.ok_or_else(|| anyhow!("..."))`, `map_err` and other similar error
conversion/option reporting cases are replaced with `context` and
`with_context` calls
* in addition to that, various `anyhow!("failed to do ...")` are
stripped with `.context("Doing ...")` messages instead to remove the
parasitic `failed to` text
* `anyhow::ensure!` is used instead of `if ... { return Err(...); }`
calls
* `anyhow::bail!` is used instead of `return Err(anyhow!(...));`

Release Notes:

- N/A
2025-05-20 23:06:07 +00:00
Piotr Osiewicz d6520954b6 chore: Bump Rust edition to 2024 (#27800)
Follow-up to https://github.com/zed-industries/zed/pull/27791

Release Notes:

- N/A
2025-03-31 20:55:27 +02:00
Mikayla Maki 8465e9262b Added center group deserialization 2022-12-03 16:06:01 -08:00
Mikayla Maki e097f1f598 Done first draft of strongly typed migrations 2022-12-03 16:05:25 -08:00
Kay Simmons 2a956a31db Add typed statements 2022-12-03 16:05:25 -08:00
Mikayla Maki 3225aee686 Refined sqlez, implemented 60% of workspace serialization sql 2022-12-03 16:05:25 -08:00
Mikayla Maki 2e3cb9dd97 Converted to sqlez, so much nicer 2022-12-03 16:05:25 -08:00
Mikayla Maki f5eefda672 WIP almost compiling with sqlez 2022-12-03 16:05:25 -08:00
Mikayla Maki 216a182a46 Finished implementing the workspace stuff 2022-12-03 16:05:25 -08:00
Mikayla Maki 152480f492 remove submodule 2022-12-03 16:05:25 -08:00