Skip to content

Commit d79769b

Browse files
committed
chore: make clippy happy
1 parent 327dd75 commit d79769b

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

src/pipelines/sass.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,12 @@ impl Sass {
149149
// Hash the contents to generate a file name, and then write the contents to the dist
150150
// dir.
151151
let hash = seahash::hash(css.as_bytes());
152-
let file_name = self
153-
.cfg
154-
.filehash
155-
.then(|| format!("{}-{:x}.css", &self.asset.file_stem.to_string_lossy(), hash))
156-
.unwrap_or(temp_target_file_name);
152+
153+
let file_name = if self.cfg.filehash {
154+
format!("{}-{:x}.css", &self.asset.file_stem.to_string_lossy(), hash)
155+
} else {
156+
temp_target_file_name
157+
};
157158

158159
let result_dir =
159160
target_path(&self.cfg.staging_dist, self.target_path.as_deref(), None).await?;

src/pipelines/tailwind_css.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ impl TailwindCss {
130130
// Hash the contents to generate a file name, and then write the contents to the dist
131131
// dir.
132132
let hash = seahash::hash(css.as_bytes());
133-
let file_name = self
134-
.cfg
135-
.filehash
136-
.then(|| format!("{}-{:x}.css", &self.asset.file_stem.to_string_lossy(), hash))
137-
.unwrap_or(file_name);
133+
let file_name = if self.cfg.filehash {
134+
format!("{}-{:x}.css", &self.asset.file_stem.to_string_lossy(), hash)
135+
} else {
136+
file_name
137+
};
138138

139139
let result_dir =
140140
target_path(&self.cfg.staging_dist, self.target_path.as_deref(), None).await?;

src/pipelines/tailwind_css_extra.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ impl TailwindCssExtra {
130130
// Hash the contents to generate a file name, and then write the contents to the dist
131131
// dir.
132132
let hash = seahash::hash(css.as_bytes());
133-
let file_name = self
134-
.cfg
135-
.filehash
136-
.then(|| format!("{}-{:x}.css", &self.asset.file_stem.to_string_lossy(), hash))
137-
.unwrap_or(file_name);
133+
let file_name = if self.cfg.filehash {
134+
format!("{}-{:x}.css", &self.asset.file_stem.to_string_lossy(), hash)
135+
} else {
136+
file_name
137+
};
138138

139139
let result_dir =
140140
target_path(&self.cfg.staging_dist, self.target_path.as_deref(), None).await?;

0 commit comments

Comments
 (0)