Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

http_client: Remove anyhow reexports (#66430)

Piotr Osiewiczf73feed9de36
diff --git a/Cargo.lock b/Cargo.lock
index 04f5c85a594..a069b149791 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -9555,7 +9555,6 @@ dependencies = [
"futures 0.3.34",
"gpui",
"gpui_util",
- "http_client",
"icons",
"image",
"language_model_core",
diff --git a/crates/dev_container/src/lib.rs b/crates/dev_container/src/lib.rs
index 38e672ffd3e..d41e8243d5f 100644
--- a/crates/dev_container/src/lib.rs
+++ b/crates/dev_container/src/lib.rs
@@ -1,11 +1,11 @@
use std::path::Path;
+use anyhow::anyhow;
use fs::Fs;
use gpui::AppContext;
use gpui::Entity;
use gpui::Task;
use gpui::WeakEntity;
-use http_client::anyhow;
use picker::Picker;
use picker::PickerDelegate;
use project::ProjectEnvironment;
@@ -1684,7 +1684,8 @@ async fn get_ghcr_features(
#[cfg(test)]
mod tests {
- use http_client::{FakeHttpClient, anyhow};
+ use anyhow::anyhow;
+ use http_client::FakeHttpClient;
use crate::{
DevContainerTemplatesResponse, devcontainer_templates_repository,
diff --git a/crates/dev_container/src/oci.rs b/crates/dev_container/src/oci.rs
index 483f706edb9..a0ecd492585 100644
--- a/crates/dev_container/src/oci.rs
+++ b/crates/dev_container/src/oci.rs
@@ -197,9 +197,10 @@ where
mod test {
use std::{path::PathBuf, sync::Arc};
+ use anyhow::anyhow;
use fs::{FakeFs, Fs};
use gpui::TestAppContext;
- use http_client::{FakeHttpClient, anyhow};
+ use http_client::FakeHttpClient;
use serde::Deserialize;
use crate::oci::{
diff --git a/crates/http_client/src/http_client.rs b/crates/http_client/src/http_client.rs
index 41d210258b3..429bcfc4218 100644
--- a/crates/http_client/src/http_client.rs
+++ b/crates/http_client/src/http_client.rs
@@ -1,6 +1,6 @@
mod async_body;
-pub use anyhow::{Result, anyhow};
+use anyhow::Result;
pub use async_body::{AsyncBody, Inner, Json};
pub use http::{self, Method, Request, Response, StatusCode, Uri, request::Builder};
use http::{HeaderName, HeaderValue};
diff --git a/crates/language_model/Cargo.toml b/crates/language_model/Cargo.toml
index 49e015f4d06..18b82f47f07 100644
--- a/crates/language_model/Cargo.toml
+++ b/crates/language_model/Cargo.toml
@@ -25,7 +25,6 @@ env_var.workspace = true
futures.workspace = true
gpui.workspace = true
gpui_util.workspace = true
-http_client.workspace = true
icons.workspace = true
image.workspace = true
language_model_core.workspace = true
diff --git a/crates/language_model/src/fake_provider.rs b/crates/language_model/src/fake_provider.rs
index b3d2137c1d3..0773be1696a 100644
--- a/crates/language_model/src/fake_provider.rs
+++ b/crates/language_model/src/fake_provider.rs
@@ -4,10 +4,9 @@ use crate::{
LanguageModelName, LanguageModelProvider, LanguageModelProviderId, LanguageModelProviderName,
LanguageModelProviderState, LanguageModelRequest,
};
-use anyhow::anyhow;
+use anyhow::{Result, anyhow};
use futures::{FutureExt, channel::mpsc, future::BoxFuture, stream::StreamExt};
use gpui::{App, AsyncApp, Entity, Task};
-use http_client::Result;
use parking_lot::Mutex;
use std::collections::VecDeque;