Skip to content

Commit 0baff7a

Browse files
committed
Upgrade encode_unicode to 1
1 parent 59ef42d commit 0baff7a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ unicode-width = { version = "0.2", optional = true }
2323
lazy_static = "1.4.0"
2424

2525
[target.'cfg(windows)'.dependencies]
26-
encode_unicode = "0.3"
26+
encode_unicode = "1"
2727

2828
[target.'cfg(windows)'.dependencies.windows-sys]
2929
version = "0.52.0"

src/windows_term/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::os::windows::ffi::OsStrExt;
1010
use std::os::windows::io::AsRawHandle;
1111
use std::{char, mem::MaybeUninit};
1212

13-
use encode_unicode::error::InvalidUtf16Tuple;
13+
use encode_unicode::error::Utf16TupleError;
1414
use encode_unicode::CharExt;
1515
use windows_sys::Win32::Foundation::{HANDLE, INVALID_HANDLE_VALUE, MAX_PATH};
1616
use windows_sys::Win32::Storage::FileSystem::{FileNameInfo, GetFileInformationByHandleEx};
@@ -398,13 +398,13 @@ pub fn read_single_key(_ctrlc_key: bool) -> io::Result<Key> {
398398
}
399399
}
400400
// This is part of a surrogate pair. Try to read the second half.
401-
Err(InvalidUtf16Tuple::MissingSecond) => {
401+
Err(Utf16TupleError::MissingSecond) => {
402402
// Confirm that there is a next character to read.
403403
if get_key_event_count()? == 0 {
404404
let message = format!(
405405
"Read invlid utf16 {}: {}",
406406
unicode_char,
407-
InvalidUtf16Tuple::MissingSecond
407+
Utf16TupleError::MissingSecond
408408
);
409409
return Err(io::Error::new(io::ErrorKind::InvalidData, message));
410410
}

0 commit comments

Comments
 (0)