pty: Fix typo psuedo => pseudo (#7178)

This commit is contained in:
Amos Wenger 2026-09-12 10:55:12 +02:00 committed by GitHub
parent 2b56c4688f
commit c8c592d192
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 14 deletions

View File

@ -1,5 +1,5 @@
//! This crate provides a cross platform API for working with the
//! psuedo terminal (pty) interfaces provided by the system.
//! pseudo terminal (pty) interfaces provided by the system.
//! Unlike other crates in this space, this crate provides a set
//! of traits that allow selecting from different implementations
//! at runtime.

View File

@ -1,5 +1,5 @@
use crate::cmdbuilder::CommandBuilder;
use crate::win::psuedocon::PsuedoCon;
use crate::win::pseudocon::PseudoCon;
use crate::{Child, MasterPty, PtyPair, PtySize, PtySystem, SlavePty};
use anyhow::Error;
use filedescriptor::{FileDescriptor, Pipe};
@ -14,7 +14,7 @@ impl PtySystem for ConPtySystem {
let stdin = Pipe::new()?;
let stdout = Pipe::new()?;
let con = PsuedoCon::new(
let con = PseudoCon::new(
COORD {
X: size.cols as i16,
Y: size.rows as i16,
@ -44,7 +44,7 @@ impl PtySystem for ConPtySystem {
}
struct Inner {
con: PsuedoCon,
con: PseudoCon,
readable: FileDescriptor,
writable: Option<FileDescriptor>,
size: PtySize,

View File

@ -12,7 +12,7 @@ use windows_sys::Win32::System::Threading::{
pub mod conpty;
mod procthreadattr;
mod psuedocon;
mod pseudocon;
use filedescriptor::OwnedHandle;

View File

@ -1,4 +1,4 @@
use crate::win::psuedocon::HPCON;
use crate::win::pseudocon::HPCON;
use anyhow::{ensure, Error};
use std::io::Error as IoError;
use std::{mem, ptr};

View File

@ -22,7 +22,7 @@ use windows_sys::Win32::System::Threading::{
pub type HPCON = HANDLE;
pub const PSUEDOCONSOLE_INHERIT_CURSOR: u32 = 0x1;
pub const PSEUDOCONSOLE_INHERIT_CURSOR: u32 = 0x1;
pub const PSEUDOCONSOLE_RESIZE_QUIRK: u32 = 0x2;
pub const PSEUDOCONSOLE_WIN32_INPUT_MODE: u32 = 0x4;
#[allow(dead_code)]
@ -61,20 +61,20 @@ lazy_static! {
static ref CONPTY: ConPtyFuncs = load_conpty();
}
pub struct PsuedoCon {
pub struct PseudoCon {
con: HPCON,
}
unsafe impl Send for PsuedoCon {}
unsafe impl Sync for PsuedoCon {}
unsafe impl Send for PseudoCon {}
unsafe impl Sync for PseudoCon {}
impl Drop for PsuedoCon {
impl Drop for PseudoCon {
fn drop(&mut self) {
unsafe { (CONPTY.ClosePseudoConsole)(self.con) };
}
}
impl PsuedoCon {
impl PseudoCon {
pub fn new(size: COORD, input: FileDescriptor, output: FileDescriptor) -> Result<Self, Error> {
let mut con: HPCON = INVALID_HANDLE_VALUE;
let result = unsafe {
@ -82,7 +82,7 @@ impl PsuedoCon {
size,
input.as_raw_handle(),
output.as_raw_handle(),
PSUEDOCONSOLE_INHERIT_CURSOR
PSEUDOCONSOLE_INHERIT_CURSOR
| PSEUDOCONSOLE_RESIZE_QUIRK
| PSEUDOCONSOLE_WIN32_INPUT_MODE,
&mut con,
@ -90,7 +90,7 @@ impl PsuedoCon {
};
ensure!(
result == S_OK,
"failed to create psuedo console: HRESULT {}",
"failed to create pseudo console: HRESULT {}",
result
);
Ok(Self { con })