pty: fixup build when serde_support is not enabled

This commit is contained in:
Wez Furlong committed 2019-07-23 13:31:01 -07:00
1 parent 83e1f410e0
commit 9d46bd889f
2 files changed
+5 -2

No files matched your search

+3 -1
View File
@@ -2,6 +2,7 @@
use failure::{ensure, Error};
#[cfg(windows)]
use log::error;
#[cfg(feature = "serde_support")]
use serde_derive::*;
use std::ffi::{OsStr, OsString};
#[cfg(windows)]
@@ -9,7 +10,8 @@ use std::os::windows::ffi::OsStrExt;
/// `CommandBuilder` is used to prepare a command to be spawned into a pty.
/// The interface is intentionally similar to that of `std::process::Command`.
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[derive(Debug, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct CommandBuilder {
args: Vec<OsString>,
envs: Vec<(OsString, OsString)>,
+2 -1
View File
@@ -50,7 +50,8 @@ pub mod unix;
pub mod win;
/// Represents the size of the visible display area in the pty
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct PtySize {
/// The number of lines of text
pub rows: u16,