remove some extern crates

These got overlooked when migrating from 2015->2018 edition syntax.
This commit is contained in:
Wez Furlong committed 2019-05-26 08:27:43 -07:00
1 parent b83656b378
commit 8a76f27f9b
18 files changed
+21 -40

No files matched your search

+1
View File
@@ -3,6 +3,7 @@
use super::*;
mod c0;
use bitflags::bitflags;
mod c1;
mod csi;
mod selection;
+1
View File
@@ -54,6 +54,7 @@
//! implements some heuristics (a fancy word for guessing) to compute
//! the terminal capabilities, but also offers a `ProbeHintsBuilder`
//! that can be used by the embedding application to override those choices.
use derive_builder::*;
use failure::{err_msg, Error};
use semver::Version;
use std::env::var;
+1
View File
@@ -3,6 +3,7 @@ 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;
+2
View File
@@ -2,9 +2,11 @@
// for FromPrimitive
#![cfg_attr(feature = "cargo-clippy", allow(clippy::useless_attribute))]
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)]
+1
View File
@@ -3,6 +3,7 @@ use crate::cell::{Blink, Intensity, Underline};
use crate::color::{AnsiColor, ColorSpec, RgbColor};
use crate::input::{Modifiers, MouseButtons};
use num::{self, ToPrimitive};
use num_derive::*;
use std::fmt::{Display, Error as FmtError, Formatter};
#[derive(Debug, Clone, PartialEq, Eq)]
+1
View File
@@ -1,4 +1,5 @@
use num::{self, ToPrimitive};
use num_derive::*;
use std::fmt::{Display, Error as FmtError, Formatter, Write as FmtWrite};
#[derive(Debug, Clone, PartialEq, Eq)]
+1
View File
@@ -5,6 +5,7 @@
//! semantic meaning to them. It can also encode the semantic values as
//! escape sequences. It provides encoding and decoding functionality
//! only; it does not provide terminal emulation facilities itself.
use num_derive::*;
use std::fmt::{Display, Error as FmtError, Formatter, Write as FmtWrite};
pub mod csi;
+3 -1
View File
@@ -1,7 +1,9 @@
pub use crate::hyperlink::Hyperlink;
use base64;
use failure::{self, err_msg, Error};
use bitflags::bitflags;
use failure::{self, bail, ensure, err_msg, Error};
use num;
use num_derive::*;
use ordered_float::NotNaN;
use std::collections::HashMap;
use std::fmt::{Display, Error as FmtError, Formatter};
+1 -1
View File
@@ -4,7 +4,7 @@
//! We use that as the foundation of our hyperlink support, and the game
//! plan is to then implicitly enable the hyperlink attribute for a cell
//! as we recognize linkable input text during print() processing.
use failure::{err_msg, Error};
use failure::{ensure, err_msg, Error};
use regex::{Captures, Regex};
use serde::{self, Deserialize, Deserializer};
use serde_derive::*;
+2
View File
@@ -5,7 +5,9 @@ use crate::escape::parser::Parser;
use crate::escape::{Action, CSI};
use crate::keymap::{Found, KeyMap};
use crate::readbuf::ReadBuffer;
use bitflags::bitflags;
use std;
#[cfg(windows)]
use winapi::um::wincon::{
INPUT_RECORD, KEY_EVENT, KEY_EVENT_RECORD, MOUSE_EVENT, MOUSE_EVENT_RECORD,
-1
View File
@@ -22,7 +22,6 @@ pub trait IsTty {
#[cfg(unix)]
impl<S: AsRawFd> IsTty for S {
fn is_tty(&self) -> bool {
use libc;
let fd = self.as_raw_fd();
unsafe { libc::isatty(fd) == 1 }
}
-34
View File
@@ -32,40 +32,6 @@
//! mode.
//! * `Widget` trait allows composition of UI elements at a higher
//! level.
#[macro_use]
extern crate failure;
extern crate base64;
extern crate fnv;
extern crate libc;
extern crate palette;
extern crate semver;
extern crate serde;
#[cfg(unix)]
extern crate signal_hook;
extern crate terminfo;
#[cfg(unix)]
extern crate termios;
#[cfg(windows)]
extern crate winapi;
#[macro_use]
extern crate serde_derive;
extern crate num;
extern crate vte;
#[macro_use]
extern crate num_derive;
#[macro_use]
extern crate derive_builder;
#[macro_use]
extern crate bitflags;
extern crate cassowary;
extern crate image as image_crate;
extern crate memmem;
extern crate ordered_float;
extern crate regex;
extern crate smallvec;
extern crate unicode_segmentation;
extern crate unicode_width;
pub mod caps;
pub mod cell;
+1
View File
@@ -2,6 +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 std::sync::Arc;
/// `Change` describes an update operation to be applied to a `Surface`.
+2
View File
@@ -3,6 +3,8 @@ use crate::cellcluster::CellCluster;
use crate::hyperlink::Rule;
use crate::range::in_range;
use crate::surface::Change;
use bitflags::bitflags;
use serde_derive::*;
use std::ops::Range;
use std::sync::Arc;
use unicode_segmentation::UnicodeSegmentation;
+1
View File
@@ -2,6 +2,7 @@ use crate::cell::{AttributeChange, Cell, CellAttributes};
use crate::color::ColorAttribute;
use crate::image::ImageCell;
use ordered_float::NotNaN;
use serde_derive::*;
use std::borrow::Cow;
use std::cmp::min;
use unicode_segmentation::UnicodeSegmentation;
+1 -1
View File
@@ -3,7 +3,7 @@
use crate::caps::Capabilities;
use crate::input::InputEvent;
use crate::surface::Change;
use failure::Error;
use failure::{format_err, Error};
use num::{self, NumCast};
use std::fmt::Display;
use std::time::Duration;
+1 -1
View File
@@ -1,5 +1,5 @@
use crate::istty::IsTty;
use failure::Error;
use failure::{bail, format_err, Error};
use std::cmp::{max, min};
use std::collections::VecDeque;
use std::fs::OpenOptions;
+1 -1
View File
@@ -4,7 +4,7 @@
use cassowary::strength::{REQUIRED, STRONG, WEAK};
use cassowary::WeightedRelation::*;
use cassowary::{AddConstraintError, Expression, Solver, SuggestValueError, Variable};
use failure::{err_msg, Error};
use failure::{err_msg, format_err, Error};
use std::collections::HashMap;
use crate::widgets::{Rect, WidgetId};