Skip to content

Commit

Permalink
Merge branch 'docsrs-show-features'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Aug 20, 2022
2 parents df62f50 + b1c40b0 commit 31c2351
Show file tree
Hide file tree
Showing 94 changed files with 154 additions and 161 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ default-run = "gix"
include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"]
resolver = "2"


[[bin]]
name = "ein"
path = "src/ein.rs"
test = false
doctest = false


[[bin]]
name = "gix"
path = "src/gix.rs"
Expand All @@ -41,7 +39,6 @@ pretty-cli = [ "gitoxide-core/serde1", "prodash/progress-tree", "prodash/progres
## that appears after a short duration.
prodash-render-line-crossterm = ["prodash-render-line", "prodash/render-line-crossterm", "atty", "crosstermion"]


#! ### Convenience Features
#! These combine common choices of the above features to represent typical builds

Expand Down Expand Up @@ -183,3 +180,4 @@ exclude = ["cargo-smart-release/tests/fixtures/tri-depth-workspace/a",

[package.metadata.docs.rs]
features = ["document-features", "max"]
rustdoc-args = ["--cfg", "docsrs"]
2 changes: 0 additions & 2 deletions cargo-smart-release/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ categories = ["development-tools::cargo-plugins"]
keywords = ["cargo"]
include = ["src/**/*", "README.md", "CHANGELOG.md"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "cargo-smart-release"
path = "src/cli/main-smart-release.rs"
Expand Down
3 changes: 2 additions & 1 deletion git-actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ pretty_assertions = "1.0.0"
git-testtools = { path = "../tests/tools"}

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
4 changes: 3 additions & 1 deletion git-actor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]
#![deny(rust_2018_idioms, missing_docs)]

use bstr::{BStr, BString};
pub use git_date::{time::Sign, Time};

Expand Down
3 changes: 1 addition & 2 deletions git-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ doctest = false
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
serde1 = ["serde", "bstr/serde1", "git-glob/serde1", "compact_str/serde"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
git-features = { version = "^0.22.1", path = "../git-features" }
git-path = { version = "^0.4.0", path = "../git-path" }
Expand All @@ -36,4 +34,5 @@ git-testtools = { path = "../tests/tools"}

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
features = ["document-features"]
3 changes: 2 additions & 1 deletion git-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]
#![deny(rust_2018_idioms, missing_docs)]

use std::path::PathBuf;

Expand Down
2 changes: 0 additions & 2 deletions git-bitmap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ edition = "2018"
doctest = false
test = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
quick-error = "2.0.0"

Expand Down
4 changes: 2 additions & 2 deletions git-bitmap/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(unsafe_code, missing_docs, rust_2018_idioms)]
#![allow(missing_docs)]
//! An implementation of the shared parts of git bitmaps used in `git-pack`, `git-index` and `git-worktree`.
//!
//! Note that many tests are performed indirectly by tests in the aforementioned consumer crates.
#![deny(rust_2018_idioms, unsafe_code)]
#![allow(missing_docs)]

/// Bitmap utilities for the advanced word-aligned hybrid bitmap
pub mod ewah;
Expand Down
3 changes: 1 addition & 2 deletions git-chunk/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! Low-level access to reading and writing chunk file based formats.
//!
//! See the [git documentation](https://github.com/git/git/blob/seen/Documentation/technical/chunk-format.txt) for details.
#![deny(unsafe_code)]
#![deny(rust_2018_idioms, missing_docs)]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

/// An identifier to describe the kind of chunk, unique within a chunk file, typically in ASCII
pub type Id = [u8; 4];
Expand Down
3 changes: 2 additions & 1 deletion git-commitgraph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ document-features = { version = "0.2.0", optional = true }
git-testtools = { path = "../tests/tools" }

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
3 changes: 2 additions & 1 deletion git-commitgraph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![deny(unsafe_code, rust_2018_idioms, missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

pub mod file;
pub mod graph;
Expand Down
3 changes: 2 additions & 1 deletion git-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ harness = false
path = "./benches/large_config_file.rs"

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
4 changes: 2 additions & 2 deletions git-config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![deny(missing_docs, unsafe_code, rust_2018_idioms)]

//! # `git_config`
//!
//! This crate is a high performance `git-config` file reader and writer. It
Expand Down Expand Up @@ -36,6 +34,8 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

pub mod file;

Expand Down
3 changes: 1 addition & 2 deletions git-credentials/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ doctest = false
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
serde1 = ["serde", "bstr/serde1", "git-sec/serde1"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
git-sec = { version = "^0.3.0", path = "../git-sec" }
quick-error = "2.0.0"
Expand All @@ -27,3 +25,4 @@ document-features = { version = "0.2.1", optional = true }
[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
3 changes: 2 additions & 1 deletion git-credentials/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

///
pub mod helper;
Expand Down
5 changes: 2 additions & 3 deletions git-date/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ edition = "2018"
[lib]
doctest = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
serde1 = ["serde", "bstr/serde1"]
Expand All @@ -28,5 +26,6 @@ document-features = { version = "0.2.0", optional = true }
git-testtools = { path = "../tests/tools"}

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
3 changes: 2 additions & 1 deletion git-date/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

///
pub mod time;
Expand Down
2 changes: 0 additions & 2 deletions git-diff/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ include = ["src/**/*"]
[lib]
doctest = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
git-hash = { version = "^0.9.7", path = "../git-hash" }
git-object = { version = "^0.20.1", path = "../git-object" }
Expand Down
4 changes: 2 additions & 2 deletions git-diff/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Algorithms for diffing various git object types and for generating patches, highly optimized for performance.
#![forbid(unsafe_code, rust_2018_idioms)]
#[deny(missing_docs)]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

///
pub mod tree;
2 changes: 0 additions & 2 deletions git-discover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ include = ["src/**/*", "CHANGELOG.md"]
[lib]
doctest = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
git-sec = { version = "^0.3.0", path = "../git-sec", features = ["thiserror"] }
git-path = { version = "^0.4.0", path = "../git-path" }
Expand Down
4 changes: 2 additions & 2 deletions git-discover/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Find git repositories or search them upwards from a starting point, or determine if a directory looks like a git repository.
//!
//! Note that detection methods are educated guesses using the presence of files, without looking too much into the details.
#![forbid(unsafe_code, rust_2018_idioms)]
#![deny(missing_docs)]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]

/// The name of the `.git` directory.
pub const DOT_GIT_DIR: &str = ".git";
Expand Down
10 changes: 6 additions & 4 deletions git-features/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default = []
progress = ["prodash"]

## If set, and with the `parallel` feature set, walkdir iterators will be single-threaded.
## This feature exists to avoid [certain side-effects](https://github.com/starship/starship/issues/4251) of rayong threadpool configuration with `jwalk`.
## This feature exists to avoid [certain side-effects](https://github.com/starship/starship/issues/4251) of rayon threadpool configuration with `jwalk`.
fs-walkdir-single-threaded = []

## Use scoped threads and channels to parallelize common workloads on multiple objects. If enabled, it is used everywhere
Expand Down Expand Up @@ -131,12 +131,14 @@ libc = { version = "0.2.119" }
[dev-dependencies]
bstr = { version = "0.2.15", default-features = false }

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true

# Assembly doesn't yet compile on MSVC on windows, but does on GNU, see https://github.com/RustCrypto/asm-hashes/issues/17
# TODO: potentially include it only for certain architectures
# [target.'cfg(all(any(target_arch = "x86", target_arch = "x86_64"), not(target_env = "msvc")))'.dependencies]
[target.'cfg(not(target_env = "msvc"))'.dependencies]
sha-1 = { version = "0.10.0", optional = true, features = ["asm"] }

[package.metadata.docs.rs]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
4 changes: 2 additions & 2 deletions git-features/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![forbid(rust_2018_idioms)]
#![deny(unsafe_code, missing_docs)]
//! A crate providing foundational capabilities to other `git-*` crates with trade-offs between compile time, binary size or speed
//! selectable using cargo feature toggles.
//!
Expand All @@ -13,6 +11,8 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

///
pub mod cache;
Expand Down
2 changes: 0 additions & 2 deletions git-filter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ edition = "2018"
[lib]
doctest = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 2 additions & 1 deletion git-filter/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#![forbid(unsafe_code, rust_2018_idioms)]
#![deny(rust_2018_idioms)]
#![forbid(unsafe_code)]
5 changes: 2 additions & 3 deletions git-glob/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ doctest = false
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
serde1 = ["serde", "bstr/serde1"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bstr = { version = "0.2.13", default-features = false, features = ["std"]}
bitflags = "1.3.2"
Expand All @@ -27,5 +25,6 @@ document-features = { version = "0.2.0", optional = true }
git-testtools = { path = "../tests/tools"}

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
3 changes: 2 additions & 1 deletion git-glob/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]
#![deny(rust_2018_idioms, missing_docs)]

use bstr::BString;

Expand Down
3 changes: 2 additions & 1 deletion git-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ document-features = { version = "0.2.0", optional = true }
git-testtools = { path = "../tests/tools"}

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
features = ["document-features"]
rustdoc-args = ["--cfg", "docsrs"]
8 changes: 4 additions & 4 deletions git-hash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
//! These are provided in borrowed versions as well as owned ones.
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![deny(unsafe_code)]
#![deny(rust_2018_idioms, missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]

mod borrowed;

Expand Down
4 changes: 1 addition & 3 deletions git-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ serde1 = ["serde", "smallvec/serde", "git-hash/serde1"]
internal-testing-git-features-parallel = ["git-features/parallel"]
internal-testing-to-avoid-being-run-by-cargo-test-all = []

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
git-features = { version = "^0.22.1", path = "../git-features", features = ["rustsha1", "progress"] }
git-hash = { version = "^0.9.7", path = "../git-hash" }
Expand All @@ -55,4 +53,4 @@ git-testtools = { path = "../tests/tools"}

[package.metadata.docs.rs]
features = ["document-features", "serde1"]

rustdoc-args = ["--cfg", "docsrs"]
1 change: 1 addition & 0 deletions git-index/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![deny(unsafe_code, missing_docs, rust_2018_idioms)]

use std::{ops::Range, path::PathBuf};
Expand Down
2 changes: 0 additions & 2 deletions git-lfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ edition = "2018"
[lib]
doctest = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 2 additions & 1 deletion git-lfs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#![forbid(unsafe_code, rust_2018_idioms)]
#![deny(rust_2018_idioms)]
#![forbid(unsafe_code)]
Loading

0 comments on commit 31c2351

Please sign in to comment.