Extract http
from util
(#11680)
This avoids the CLI linking libssl etc... Release Notes: - N/A
This commit is contained in:
parent
df41435d1a
commit
5515ba6043
77 changed files with 419 additions and 336 deletions
|
@ -69,6 +69,7 @@ use rand::prelude::*;
|
|||
use search_history::SearchHistory;
|
||||
use worktree::LocalSnapshot;
|
||||
|
||||
use http::{HttpClient, Url};
|
||||
use rpc::{ErrorCode, ErrorExt as _};
|
||||
use search::SearchQuery;
|
||||
use serde::Serialize;
|
||||
|
@ -99,9 +100,7 @@ use task::static_source::{StaticSource, TrackedFile};
|
|||
use terminals::Terminals;
|
||||
use text::{Anchor, BufferId, LineEnding};
|
||||
use util::{
|
||||
debug_panic, defer,
|
||||
http::{HttpClient, Url},
|
||||
maybe, merge_json_value_into, parse_env_output,
|
||||
debug_panic, defer, maybe, merge_json_value_into, parse_env_output,
|
||||
paths::{
|
||||
LOCAL_SETTINGS_RELATIVE_PATH, LOCAL_TASKS_RELATIVE_PATH, LOCAL_VSCODE_TASKS_RELATIVE_PATH,
|
||||
},
|
||||
|
@ -1003,7 +1002,7 @@ impl Project {
|
|||
let fs = Arc::new(RealFs::default());
|
||||
let languages = LanguageRegistry::test(cx.background_executor().clone());
|
||||
let clock = Arc::new(FakeSystemClock::default());
|
||||
let http_client = util::http::FakeHttpClient::with_404_response();
|
||||
let http_client = http::FakeHttpClient::with_404_response();
|
||||
let client = cx
|
||||
.update(|cx| client::Client::new(clock, http_client.clone(), cx))
|
||||
.unwrap();
|
||||
|
@ -1047,7 +1046,7 @@ impl Project {
|
|||
|
||||
let languages = LanguageRegistry::test(cx.executor());
|
||||
let clock = Arc::new(FakeSystemClock::default());
|
||||
let http_client = util::http::FakeHttpClient::with_404_response();
|
||||
let http_client = http::FakeHttpClient::with_404_response();
|
||||
let client = cx.update(|cx| client::Client::new(clock, http_client.clone(), cx));
|
||||
let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx));
|
||||
let project = cx.update(|cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue