Skip to content

Commit bdebcd4

Browse files
authored
fix: re-export HeaderName and HeaderValue (#85)
1 parent 66e4c32 commit bdebcd4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

rs_lib/src/file_fetcher/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use http::header::ACCEPT;
1717
use http::header::AUTHORIZATION;
1818
use http::header::IF_NONE_MATCH;
1919
use http::header::LOCATION;
20-
use http::HeaderValue;
2120
use log::debug;
2221
use sys_traits::FsFileMetadata;
2322
use sys_traits::FsMetadataValue;
@@ -45,6 +44,9 @@ pub use auth_tokens::AuthToken;
4544
pub use auth_tokens::AuthTokenData;
4645
pub use auth_tokens::AuthTokens;
4746
pub use http::HeaderMap;
47+
pub use http::HeaderName;
48+
pub use http::HeaderValue;
49+
pub use http::StatusCode;
4850

4951
/// Indicates how cached source files should be handled.
5052
#[derive(Debug, Clone, Eq, PartialEq)]

rs_lib/src/global/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub struct GlobalHttpCache<Sys: GlobalHttpCacheSys> {
6060

6161
impl<Sys: GlobalHttpCacheSys> GlobalHttpCache<Sys> {
6262
pub fn new(sys: Sys, path: PathBuf) -> Self {
63-
#[cfg(not(feature = "wasm"))]
63+
#[cfg(not(target_arch = "wasm32"))]
6464
assert!(path.is_absolute());
6565
Self { path, sys }
6666
}

rs_lib/src/local.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub struct LocalLspHttpCache<TSys: LocalHttpCacheSys> {
6868

6969
impl<TSys: LocalHttpCacheSys> LocalLspHttpCache<TSys> {
7070
pub fn new(path: PathBuf, global_cache: GlobalHttpCacheRc<TSys>) -> Self {
71-
#[cfg(not(feature = "wasm"))]
71+
#[cfg(not(target_arch = "wasm32"))]
7272
assert!(path.is_absolute());
7373
let manifest = LocalCacheManifest::new_for_lsp(
7474
path.join("manifest.json"),
@@ -245,7 +245,7 @@ impl<TSys: LocalHttpCacheSys> LocalHttpCache<TSys> {
245245
allow_global_to_local: GlobalToLocalCopy,
246246
jsr_registry_url: Url,
247247
) -> Self {
248-
#[cfg(not(feature = "wasm"))]
248+
#[cfg(not(target_arch = "wasm32"))]
249249
assert!(path.is_absolute());
250250
let manifest = LocalCacheManifest::new(
251251
path.join("manifest.json"),

0 commit comments

Comments
 (0)