mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 11:11:11 +08:00
kernel/builtins/test262: 本批新码 clippy 三则 + fmt 归净——obfuscated_if_else(source_escape_to_key 值域判定改 if/else)、needless_range_loop(decode_uri_units 保留字符原样段改 extend_from_slice)、needless_borrows_for_generic_args(844f2f4 rename 调用两处冗余借用);fmt 漂移(compiler.rs/vm.rs 构造体折行)一并归净。七 crate clippy 零告警、fmt --check 净、七 crate 2879/1(唯一失败 compile_class_declaration 既有)、release 子集 8/8 + 2/2 终验
This commit is contained in:
@@ -79,9 +79,7 @@ fn decode_uri_units(input: &[u16], preserve_reserved: bool) -> Result<Vec<u16>,
|
||||
let decoded = std::str::from_utf8(&encoded).map_err(|_| ())?;
|
||||
let ch = decoded.chars().next().expect("单字节序解出恰一个码点");
|
||||
if preserve_reserved && ch.is_ascii() && URI_RESERVED.contains(ch) {
|
||||
for k in raw_start..i {
|
||||
out.push(input[k]);
|
||||
}
|
||||
out.extend_from_slice(&input[raw_start..i]);
|
||||
continue;
|
||||
}
|
||||
let cp = ch as u32;
|
||||
|
||||
Reference in New Issue
Block a user