mirror of
				https://github.com/BurntSushi/ripgrep.git
				synced 2025-10-30 23:17:47 +02:00 
			
		
		
		
	edition: manual changes
This is mostly just about removing 'extern crate' everywhere and fixing the fallout.
This commit is contained in:
		| @@ -16,7 +16,7 @@ edition = "2018" | ||||
|  | ||||
| [features] | ||||
| default = ["serde1"] | ||||
| serde1 = ["base64", "serde", "serde_derive", "serde_json"] | ||||
| serde1 = ["base64", "serde", "serde_json"] | ||||
|  | ||||
| [dependencies] | ||||
| base64 = { version = "0.13.0", optional = true } | ||||
| @@ -24,8 +24,7 @@ bstr = "0.2.0" | ||||
| grep-matcher = { version = "0.1.2", path = "../matcher" } | ||||
| grep-searcher = { version = "0.1.4", path = "../searcher" } | ||||
| termcolor = "1.0.4" | ||||
| serde = { version = "1.0.77", optional = true } | ||||
| serde_derive = { version = "1.0.77", optional = true } | ||||
| serde = { version = "1.0.77", optional = true, features = ["derive"] } | ||||
| serde_json = { version = "1.0.27", optional = true } | ||||
|  | ||||
| [dev-dependencies] | ||||
|   | ||||
| @@ -26,9 +26,3 @@ Add this to your `Cargo.toml`: | ||||
| [dependencies] | ||||
| grep-printer = "0.1" | ||||
| ``` | ||||
|  | ||||
| and this to your crate root: | ||||
|  | ||||
| ```rust | ||||
| extern crate grep_printer; | ||||
| ``` | ||||
|   | ||||
| @@ -147,9 +147,6 @@ pub struct ColorSpecs { | ||||
| /// A `UserColorSpec` can also be converted to a `termcolor::ColorSpec`: | ||||
| /// | ||||
| /// ```rust | ||||
| /// extern crate grep_printer; | ||||
| /// extern crate termcolor; | ||||
| /// | ||||
| /// # fn main() { | ||||
| /// use termcolor::{Color, ColorSpec}; | ||||
| /// use grep_printer::UserColorSpec; | ||||
|   | ||||
| @@ -27,10 +27,6 @@ contain matches. | ||||
| This example shows how to create a "standard" printer and execute a search. | ||||
|  | ||||
| ``` | ||||
| extern crate grep_regex; | ||||
| extern crate grep_printer; | ||||
| extern crate grep_searcher; | ||||
|  | ||||
| use std::error::Error; | ||||
|  | ||||
| use grep_regex::RegexMatcher; | ||||
| @@ -68,20 +64,6 @@ fn example() -> Result<(), Box<Error>> { | ||||
|  | ||||
| #![deny(missing_docs)] | ||||
|  | ||||
| #[cfg(feature = "serde1")] | ||||
| extern crate base64; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| #[cfg(feature = "serde1")] | ||||
| #[macro_use] | ||||
| extern crate serde_derive; | ||||
| #[cfg(feature = "serde1")] | ||||
| extern crate serde_json; | ||||
|  | ||||
|  | ||||
| pub use crate::color::{ | ||||
|     default_color_specs, ColorError, ColorSpecs, UserColorSpec, | ||||
| }; | ||||
|   | ||||
| @@ -8,7 +8,7 @@ use crate::util::NiceDuration; | ||||
| /// When statistics are reported by a printer, they correspond to all searches | ||||
| /// executed with that printer. | ||||
| #[derive(Clone, Debug, Default, PartialEq, Eq)] | ||||
| #[cfg_attr(feature = "serde1", derive(Serialize))] | ||||
| #[cfg_attr(feature = "serde1", derive(serde::Serialize))] | ||||
| pub struct Stats { | ||||
|     elapsed: NiceDuration, | ||||
|     searches: u64, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user