mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
Remove redundant code in parse_codepoint
This commit is contained in:
@@ -1019,15 +1019,15 @@ fn parse_codepoint(
|
||||
return ControlFlow::Continue(true);
|
||||
}
|
||||
let mut codepoint = u32::from(res);
|
||||
let sz = unsafe {
|
||||
match unsafe {
|
||||
mbrtowc(
|
||||
std::ptr::addr_of_mut!(codepoint),
|
||||
std::ptr::addr_of!(read_byte).cast(),
|
||||
1,
|
||||
state,
|
||||
)
|
||||
} as isize;
|
||||
match sz {
|
||||
} as isize
|
||||
{
|
||||
-1 => {
|
||||
FLOG!(reader, "Illegal input");
|
||||
*consumed += 1;
|
||||
@@ -1038,12 +1038,6 @@ fn parse_codepoint(
|
||||
// Sequence not yet complete.
|
||||
return ControlFlow::Continue(false);
|
||||
}
|
||||
0 => {
|
||||
// Actual nul char.
|
||||
*consumed += 1;
|
||||
out_seq.push('\0');
|
||||
return ControlFlow::Continue(true);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
if let Some(res) = char::from_u32(codepoint) {
|
||||
|
||||
Reference in New Issue
Block a user