Skip to content

Commit

Permalink
chore: fix conclict
Browse files Browse the repository at this point in the history
  • Loading branch information
hardfist committed Aug 21, 2024
1 parent b6057ad commit 957b874
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crates/rspack_core/src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ where
if let Some(source) = asset.get_source() {
let filename = filename
.split_once('?')
.map(|(filename, _query)| filename)
.unwrap_or(filename);
.map_or(filename, |(filename, _query)| filename);
let file_path = output_path.join(filename);
self
.output_filesystem
Expand Down
2 changes: 1 addition & 1 deletion crates/rspack_core/src/normal_module_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ impl NormalModuleFactory {
} else {
// resource without scheme and without path
if resource.is_empty() || resource.starts_with(QUESTION_MARK) {
ResourceData::new(resource.to_owned()).path(Utf8PathBuf::from(""))
ResourceData::new(resource.clone()).path(Utf8PathBuf::from(""))
} else {
// resource without scheme and with path
let resolve_args = ResolveArgs {
Expand Down
2 changes: 1 addition & 1 deletion crates/rspack_core/src/options/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ impl PublicPath {

pub fn render_auto_public_path(compilation: &Compilation, filename: &str) -> String {
let public_path = match Utf8Path::new(filename).parent() {
None => "".to_string(),
None => String::new(),
Some(dirname) => compilation
.options
.output
Expand Down

0 comments on commit 957b874

Please sign in to comment.