Minor style changes

This commit is contained in:
sharkdp 2017-09-17 09:37:39 +02:00
parent 2a3dd5b631
commit c1b8d1eae1
3 changed files with 21 additions and 20 deletions

2
Cargo.lock generated
View File

@ -1,6 +1,6 @@
[root]
name = "fd-find"
version = "3.0.0"
version = "3.1.0"
dependencies = [
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,6 +1,6 @@
[package]
name = "fd-find"
version = "3.0.0"
version = "3.1.0"
authors = ["David Peter <mail@david-peter.de>"]
description = "fd is a simple, fast and user-friendly alternative to find."
homepage = "https://github.com/sharkdp/fd"

View File

@ -40,6 +40,15 @@ enum PathDisplay {
Relative
}
/// The type of file to search for.
#[derive(Copy, Clone)]
enum FileType {
Any,
RegularFile,
Directory,
SymLink
}
/// Configuration options for *fd*.
struct FdOptions {
/// Determines whether the regex search is case-sensitive or case-insensitive.
@ -82,16 +91,8 @@ struct FdOptions {
/// how to style different filetypes.
ls_colors: Option<LsColors>,
file_type: FileType,
}
/// The type of file to search for. All files other than the specified type will be ignored.
#[derive(Copy, Clone)]
enum FileType {
Any,
RegularFile,
Directory,
SymLink,
file_type: FileType,
}
/// The receiver thread can either be buffering results or directly streaming to the console.