Skip to content

Commit

Permalink
Remove pre-2018 extern crate syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacdonald committed Jan 12, 2024
1 parent 0b9686a commit 5e58f37
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 26 deletions.
1 change: 0 additions & 1 deletion benches/view/draw_buffer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
extern crate amp;
#[macro_use]
extern crate criterion;

Expand Down
4 changes: 2 additions & 2 deletions src/input/key_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use smallvec::SmallVec;
use std::collections::HashMap;
use std::ops::{Deref, DerefMut};
use std::convert::Into;
use crate::yaml::yaml::{Hash, Yaml, YamlLoader};
use yaml_rust::yaml::{Hash, Yaml, YamlLoader};

/// Nested HashMap newtype that provides a more ergonomic interface.
pub struct KeyMap(HashMap<String, HashMap<Key, SmallVec<[Command; 4]>>>);
Expand Down Expand Up @@ -241,7 +241,7 @@ impl Into<HashMap<String, HashMap<Key, SmallVec<[Command; 4]>>>> for KeyMap {

#[cfg(test)]
mod tests {
use crate::yaml::YamlLoader;
use yaml_rust::YamlLoader;
use super::KeyMap;
use crate::commands;
use crate::input::Key;
Expand Down
16 changes: 0 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// `error_chain!` can recurse deeply
#![recursion_limit = "1024"]

// External dependencies
extern crate app_dirs2;
extern crate bloodhound;
extern crate fragment;
extern crate git2;
extern crate luthor;
extern crate mio;
extern crate regex;
extern crate scribe;
extern crate signal_hook;
extern crate syntect;
extern crate unicode_segmentation;
extern crate cli_clipboard as clipboard;
extern crate yaml_rust as yaml;
extern crate smallvec;

#[macro_use]
extern crate error_chain;

Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
extern crate amp;
use amp::Application;
use amp::Error;
use std::env;
Expand Down
2 changes: 1 addition & 1 deletion src/models/application/clipboard.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::errors::*;
use clipboard::{ClipboardContext, ClipboardProvider};
use cli_clipboard::{ClipboardContext, ClipboardProvider};

/// In-app content can be captured in both regular and full-line selection
/// modes. This type describes the structure of said content, based on the
Expand Down
2 changes: 1 addition & 1 deletion src/models/application/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ mod tests {
use crate::view::View;
use super::preferences::Preferences;

use yaml::YamlLoader;
use yaml_rust::YamlLoader;
use scribe::Buffer;
use std::cell::RefCell;
use std::env;
Expand Down
2 changes: 1 addition & 1 deletion src/models/application/modes/open/exclusions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::errors::*;
use bloodhound::ExclusionPattern;
use crate::yaml::Yaml;
use yaml_rust::Yaml;

pub fn parse(exclusion_data: &[Yaml]) -> Result<Vec<ExclusionPattern>> {
let mut mapped_exclusions = Vec::new();
Expand Down
4 changes: 2 additions & 2 deletions src/models/application/preferences/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use scribe::Buffer;
use std::fs::OpenOptions;
use std::io::Read;
use std::path::{Path, PathBuf};
use crate::yaml::yaml::{Hash, Yaml, YamlLoader};
use yaml_rust::yaml::{Hash, Yaml, YamlLoader};
use crate::models::application::modes::SearchSelectConfig;

const APP_INFO: AppInfo = AppInfo {
Expand Down Expand Up @@ -359,7 +359,7 @@ mod tests {
use super::{ExclusionPattern, Preferences, YamlLoader};
use std::path::{Path, PathBuf};
use crate::input::KeyMap;
use crate::yaml::yaml::{Hash, Yaml};
use yaml_rust::yaml::{Hash, Yaml};

#[test]
fn preferences_returns_user_defined_theme_name() {
Expand Down
2 changes: 1 addition & 1 deletion src/view/buffer/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ mod tests {
use super::{BufferRenderer, LexemeMapper, MappedLexeme};
use syntect::highlighting::ThemeSet;
use crate::view::terminal::*;
use crate::yaml::yaml::YamlLoader;
use yaml_rust::yaml::YamlLoader;

#[test]
fn tabs_beyond_terminal_width_dont_panic() {
Expand Down

0 comments on commit 5e58f37

Please sign in to comment.