diff --git a/pty/src/lib.rs b/pty/src/lib.rs index beb232d65c3..c4b3d30b68a 100644 --- a/pty/src/lib.rs +++ b/pty/src/lib.rs @@ -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. diff --git a/pty/src/win/conpty.rs b/pty/src/win/conpty.rs index 0e9a18c677e..e7e34abfb3f 100644 --- a/pty/src/win/conpty.rs +++ b/pty/src/win/conpty.rs @@ -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, size: PtySize, diff --git a/pty/src/win/mod.rs b/pty/src/win/mod.rs index 24f8f536958..abb43b94a8c 100644 --- a/pty/src/win/mod.rs +++ b/pty/src/win/mod.rs @@ -13,7 +13,7 @@ use winapi::um::winbase::INFINITE; pub mod conpty; mod procthreadattr; -mod psuedocon; +mod pseudocon; use filedescriptor::OwnedHandle; diff --git a/pty/src/win/procthreadattr.rs b/pty/src/win/procthreadattr.rs index ad97d582515..38a36aef552 100644 --- a/pty/src/win/procthreadattr.rs +++ b/pty/src/win/procthreadattr.rs @@ -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}; diff --git a/pty/src/win/psuedocon.rs b/pty/src/win/pseudocon.rs similarity index 96% rename from pty/src/win/psuedocon.rs rename to pty/src/win/pseudocon.rs index 13c7c5dba9e..1d0a5f82676 100644 --- a/pty/src/win/psuedocon.rs +++ b/pty/src/win/pseudocon.rs @@ -63,20 +63,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 { let mut con: HPCON = INVALID_HANDLE_VALUE; let result = unsafe { @@ -92,7 +92,7 @@ impl PsuedoCon { }; ensure!( result == S_OK, - "failed to create psuedo console: HRESULT {}", + "failed to create pseudo console: HRESULT {}", result ); Ok(Self { con })