Skip to content

Commit c3fd205

Browse files
committed
Nitpicking
1 parent 8c7cbc2 commit c3fd205

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/normalize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ pub(crate) fn normalize(
224224
let mut path_buf = String::with_capacity(path.len());
225225
normalize_estr(&mut path_buf, path, false, ascii_only);
226226

227-
let underflow_occurred = resolve::remove_dot_segments(&mut buf, &path_buf, None);
228-
if underflow_occurred && !allow_path_underflow {
227+
let underflow = resolve::remove_dot_segments(&mut buf, &path_buf, None);
228+
if underflow && !allow_path_underflow {
229229
return Err(NormalizeError::PathUnderflow);
230230
}
231231

src/pct_enc/table.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ impl Table {
174174
};
175175
}
176176

177-
// This expansion alone doesn't help much, but combined with
178-
// `#[inline(always)]` on `utf8::next_code_point`,
179-
// it improves performance significantly for non-ASCII case.
180177
if self.allows_pct_encoded() {
181178
if self.allows_non_ascii() {
182179
do_loop!(true, true);

src/resolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ pub(crate) fn resolve(
227227
meta.path_bounds.0 = path_start;
228228

229229
if t_path.0.starts_with('/') {
230-
let underflow_occurred = remove_dot_segments(&mut buf, t_path.0, t_path.1);
231-
if underflow_occurred && !allow_path_underflow {
230+
let underflow = remove_dot_segments(&mut buf, t_path.0, t_path.1);
231+
if underflow && !allow_path_underflow {
232232
return Err(ResolveError::PathUnderflow);
233233
}
234234
} else {

0 commit comments

Comments
 (0)