diff --git a/Cargo.lock b/Cargo.lock index 23037f2b6..2a58530c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2076,6 +2076,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "serde" version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -2454,7 +2457,6 @@ dependencies = [ "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "signal-hook 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "terminfo 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2765,7 +2767,6 @@ dependencies = [ "promise 0.2.0", "ratelimit_meter 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "ssh2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 3f58e1ba6..4f265a3b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,7 @@ palette = "0.4" portable-pty = { path = "pty", features = ["serde_support", "ssh"]} promise = { path = "promise" } ratelimit_meter = "5.0" -serde = {version="1.0", features = ["rc"]} -serde_derive = "1.0" +serde = {version="1.0", features = ["rc", "derive"]} serial = "0.4" ssh2 = "0.6" structopt = "0.2" diff --git a/src/config/keys.rs b/src/config/keys.rs index 0aa8fc6e3..e6aebe351 100644 --- a/src/config/keys.rs +++ b/src/config/keys.rs @@ -1,7 +1,6 @@ use crate::keyassignment::{KeyAssignment, SpawnTabDomain}; use anyhow::{anyhow, Error}; use serde::{Deserialize, Deserializer}; -use serde_derive::*; use termwiz::input::{KeyCode, Modifiers}; #[derive(Debug, Deserialize, Clone)] diff --git a/src/config/mod.rs b/src/config/mod.rs index 22447aab6..8858dcc9e 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -9,7 +9,7 @@ use crate::keyassignment::KeyAssignment; use anyhow::{anyhow, bail, Context, Error}; use lazy_static::lazy_static; use portable_pty::{CommandBuilder, PtySystemSelection}; -use serde_derive::*; +use serde::Deserialize; use std; use std::collections::HashMap; use std::convert::TryInto; diff --git a/src/config/ssh.rs b/src/config/ssh.rs index 264bd77a6..a69de7461 100644 --- a/src/config/ssh.rs +++ b/src/config/ssh.rs @@ -1,4 +1,4 @@ -use serde_derive::*; +use serde::Deserialize; #[derive(Default, Debug, Clone, Deserialize)] pub struct SshDomain { diff --git a/src/font/locator/mod.rs b/src/font/locator/mod.rs index 4a225e3ec..4ccf51c1b 100644 --- a/src/font/locator/mod.rs +++ b/src/font/locator/mod.rs @@ -1,6 +1,6 @@ use crate::config::FontAttributes; use anyhow::{anyhow, Error}; -use serde_derive::*; +use serde::Deserialize; use std::path::PathBuf; use std::sync::Mutex; diff --git a/src/font/rasterizer/mod.rs b/src/font/rasterizer/mod.rs index cc83ffeab..0851217ad 100644 --- a/src/font/rasterizer/mod.rs +++ b/src/font/rasterizer/mod.rs @@ -1,7 +1,7 @@ use crate::font::locator::FontDataHandle; use crate::font::units::*; use anyhow::{anyhow, bail, Error}; -use serde_derive::*; +use serde::Deserialize; use std::sync::Mutex; pub mod freetype; diff --git a/src/font/shaper/mod.rs b/src/font/shaper/mod.rs index ba694b799..5a92ba124 100644 --- a/src/font/shaper/mod.rs +++ b/src/font/shaper/mod.rs @@ -1,7 +1,7 @@ use crate::font::locator::FontDataHandle; use crate::font::units::PixelLength; use anyhow::{anyhow, Error}; -use serde_derive::*; +use serde::Deserialize; use std::sync::Mutex; pub mod allsorts; diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 8db8948e8..ecf6acc56 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -5,7 +5,7 @@ use anyhow::{anyhow, Error}; use downcast_rs::{impl_downcast, Downcast}; use lazy_static::lazy_static; use promise::Executor; -use serde_derive::*; +use serde::Deserialize; use std::cell::RefCell; use std::rc::Rc; use std::sync::Mutex; diff --git a/src/server/codec.rs b/src/server/codec.rs index 4d7402443..cf04f31be 100644 --- a/src/server/codec.rs +++ b/src/server/codec.rs @@ -17,7 +17,7 @@ use anyhow::{bail, Error}; use leb128; use log::debug; use portable_pty::{CommandBuilder, PtySize}; -use serde_derive::*; +use serde::{Deserialize, Serialize}; use std::io::Cursor; use std::sync::Arc; use term::selection::SelectionRange; diff --git a/termwiz/Cargo.toml b/termwiz/Cargo.toml index 1b6a003c4..1f882b2d5 100644 --- a/termwiz/Cargo.toml +++ b/termwiz/Cargo.toml @@ -27,8 +27,7 @@ ordered-float = "1.0" palette = "0.4" regex = "0.2" semver = "0.9" -serde = {version="1.0", features = ["rc"]} -serde_derive = "1.0" +serde = {version="1.0", features = ["rc", "derive"]} smallvec = "0.6" terminfo = "0.6" unicode-segmentation = "1.5" diff --git a/termwiz/src/cell.rs b/termwiz/src/cell.rs index f3d77a3bf..64bb68d2c 100644 --- a/termwiz/src/cell.rs +++ b/termwiz/src/cell.rs @@ -3,7 +3,6 @@ use crate::color::ColorAttribute; pub use crate::escape::osc::Hyperlink; use crate::image::ImageCell; use serde::{Deserialize, Deserializer, Serialize, Serializer}; -use serde_derive::*; use smallvec::SmallVec; use std; use std::mem; diff --git a/termwiz/src/color.rs b/termwiz/src/color.rs index 5b46d1379..3d99e3fcc 100644 --- a/termwiz/src/color.rs +++ b/termwiz/src/color.rs @@ -6,7 +6,6 @@ use num_derive::*; use palette; use palette::{LinSrgba, Srgb, Srgba}; use serde::{self, Deserialize, Deserializer, Serialize, Serializer}; -use serde_derive::*; use std::result::Result; #[derive(Debug, Clone, Copy, FromPrimitive)] diff --git a/termwiz/src/hyperlink.rs b/termwiz/src/hyperlink.rs index 8def2abf9..c97419ba9 100644 --- a/termwiz/src/hyperlink.rs +++ b/termwiz/src/hyperlink.rs @@ -6,8 +6,7 @@ //! as we recognize linkable input text during print() processing. use anyhow::{anyhow, ensure, Error}; use regex::{Captures, Regex}; -use serde::{self, Deserialize, Deserializer}; -use serde_derive::*; +use serde::{self, Deserialize, Deserializer, Serialize}; use std::collections::HashMap; use std::fmt::{Display, Error as FmtError, Formatter}; use std::ops::Range; diff --git a/termwiz/src/image.rs b/termwiz/src/image.rs index e2c879aff..719b3522e 100644 --- a/termwiz/src/image.rs +++ b/termwiz/src/image.rs @@ -13,7 +13,6 @@ use ordered_float::NotNan; use serde::{Deserialize, Deserializer, Serialize, Serializer}; -use serde_derive::*; use std::sync::Arc; fn deserialize_notnan<'de, D>(deserializer: D) -> Result, D::Error> diff --git a/termwiz/src/input.rs b/termwiz/src/input.rs index 8fa24ad86..01c2b89bb 100644 --- a/termwiz/src/input.rs +++ b/termwiz/src/input.rs @@ -6,7 +6,7 @@ use crate::escape::{Action, CSI}; use crate::keymap::{Found, KeyMap}; use crate::readbuf::ReadBuffer; use bitflags::bitflags; -use serde_derive::*; +use serde::{Deserialize, Serialize}; use std; #[cfg(windows)] diff --git a/termwiz/src/surface/change.rs b/termwiz/src/surface/change.rs index 3fc9c63d5..796c9e646 100644 --- a/termwiz/src/surface/change.rs +++ b/termwiz/src/surface/change.rs @@ -2,7 +2,7 @@ use crate::cell::{AttributeChange, CellAttributes}; use crate::color::ColorAttribute; pub use crate::image::{ImageData, TextureCoordinate}; use crate::surface::{CursorShape, Position}; -use serde_derive::*; +use serde::{Deserialize, Serialize}; use std::sync::Arc; /// `Change` describes an update operation to be applied to a `Surface`. diff --git a/termwiz/src/surface/line.rs b/termwiz/src/surface/line.rs index c36d45678..a1ccec01c 100644 --- a/termwiz/src/surface/line.rs +++ b/termwiz/src/surface/line.rs @@ -3,7 +3,7 @@ use crate::cellcluster::CellCluster; use crate::hyperlink::Rule; use crate::surface::Change; use bitflags::bitflags; -use serde_derive::*; +use serde::{Deserialize, Serialize}; use std::ops::Range; use std::sync::Arc; use unicode_segmentation::UnicodeSegmentation; diff --git a/termwiz/src/surface/mod.rs b/termwiz/src/surface/mod.rs index 380e81240..69752aac7 100644 --- a/termwiz/src/surface/mod.rs +++ b/termwiz/src/surface/mod.rs @@ -2,7 +2,7 @@ use crate::cell::{AttributeChange, Cell, CellAttributes}; use crate::color::ColorAttribute; use crate::image::ImageCell; use ordered_float::NotNan; -use serde_derive::*; +use serde::{Deserialize, Serialize}; use std::borrow::Cow; use std::cmp::min; use unicode_segmentation::UnicodeSegmentation;