From 1e3e69993ab625687ac5736d55599cb0c323e59c Mon Sep 17 00:00:00 2001 From: Tiga Ultraman Date: Thu, 25 Apr 2024 19:36:02 +0800 Subject: [PATCH] independent build Signed-off-by: Tiga Ultraman --- bundle.json | 5 +++-- ylong_http_client/BUILD.gn | 12 ++++-------- ylong_http_client/src/async_impl/interceptor/mod.rs | 6 +++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/bundle.json b/bundle.json index 69212b9..2f8c2d2 100644 --- a/bundle.json +++ b/bundle.json @@ -26,8 +26,9 @@ "ram": "~200KB", "deps": { "components": [ - "ylong_runtime", - "openssl" + "libc", + "openssl", + "ylong_runtime" ] }, "build": { diff --git a/ylong_http_client/BUILD.gn b/ylong_http_client/BUILD.gn index c61eadf..a42799f 100644 --- a/ylong_http_client/BUILD.gn +++ b/ylong_http_client/BUILD.gn @@ -31,11 +31,9 @@ ohos_rust_shared_library("ylong_http_client_inner") { ] sources = [ "src/lib.rs" ] - deps = [ - "../ylong_http:ylong_http", - "//third_party/rust/crates/libc:lib", - ] + deps = [ "../ylong_http:ylong_http" ] external_deps = [ + "libc:lib", "openssl:libcrypto_shared", "openssl:libssl_shared", "ylong_runtime:ylong_runtime", @@ -55,11 +53,9 @@ ohos_rust_unittest("rust_ylong_http_client_test_ut") { ] sources = [ "src/lib.rs" ] - deps = [ - "../ylong_http:ylong_http", - "//third_party/rust/crates/libc:lib", - ] + deps = [ "../ylong_http:ylong_http" ] external_deps = [ + "libc:lib", "openssl:libcrypto_shared", "openssl:libssl_shared", "ylong_runtime:ylong_runtime", diff --git a/ylong_http_client/src/async_impl/interceptor/mod.rs b/ylong_http_client/src/async_impl/interceptor/mod.rs index 27edf37..87964e9 100644 --- a/ylong_http_client/src/async_impl/interceptor/mod.rs +++ b/ylong_http_client/src/async_impl/interceptor/mod.rs @@ -23,7 +23,7 @@ use crate::HttpClientError; pub(crate) type Interceptors = dyn Interceptor + Sync + Send + 'static; /// Transport layer protocol type. -#[derive(Clone)] +#[derive(Clone, Debug)] pub enum ConnProtocol { /// Tcp protocol. Tcp, @@ -32,7 +32,7 @@ pub enum ConnProtocol { } /// Tcp connection information. -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct ConnDetail { /// Transport layer protocol type. pub(crate) protocol: ConnProtocol, @@ -102,7 +102,7 @@ pub trait Interceptor { } /// Intercepts the response that is eventually returned. - fn intercept_response(&self, _request: &Response) -> Result<(), HttpClientError> { + fn intercept_response(&self, _response: &Response) -> Result<(), HttpClientError> { Ok(()) } -- Gitee