Skip to content

Commit b085f11

Browse files
authored
fix: Conditionally compile SourceMapRef.resolve_path based on target support (#32)
1 parent cac5ec5 commit b085f11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/detector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::io::{BufRead, BufReader, Read};
2-
use std::path::{Path, PathBuf};
32
use std::str;
43

54
use crate::decoder::{decode_data_url, strip_junk_header, StripHeaderReader};
@@ -46,7 +45,8 @@ impl SourceMapRef {
4645
/// Resolves the reference against a local file path
4746
///
4847
/// This is similar to `resolve` but operates on file paths.
49-
pub fn resolve_path(&self, minified_path: &Path) -> Option<PathBuf> {
48+
#[cfg(any(unix, windows, target_os = "redox"))]
49+
pub fn resolve_path(&self, minified_path: &std::path::Path) -> Option<std::path::PathBuf> {
5050
let url = self.get_url();
5151
if url.starts_with("data:") {
5252
return None;

0 commit comments

Comments
 (0)