pub struct DependencyEx {
dep: Dependency,
+ available_version: Option<semver::Version>,
available_features: BTreeMap<String, Vec<String>>,
}
fn new(dep: Dependency) -> Self {
Self {
dep,
+ available_version: None,
available_features: Default::default(),
}
}
fn apply_summary(&mut self, summary: &Summary) {
+ self.available_version = Some(summary.version().clone());
self.available_features = summary
.features()
.iter()
deactivated.sort();
if !activated.is_empty() || !deactivated.is_empty() {
let prefix = format!("{:>13}", " ");
- shell.write_stderr(format_args!("{}Features:\n", prefix), &ColorSpec::new())?;
+ let suffix = if let Some(version) = &dep.available_version {
+ format!(" as of v{}", version)
+ } else {
+ "".to_owned()
+ };
+ shell.write_stderr(
+ format_args!("{}Features{}:\n", prefix, suffix),
+ &ColorSpec::new(),
+ )?;
for feat in activated {
shell.write_stderr(&prefix, &ColorSpec::new())?;
shell.write_stderr('+', &ColorSpec::new().set_bold(true).set_fg(Some(Green)))?;
warning: translating `linked_hash_map` to `linked-hash-map`
warning: translating `Inflector` to `inflector`
Adding linked-hash-map v0.5.4 to dependencies.
- Features:
+ Features as of v0.5.4:
- clippy
- heapsize
- heapsize_impl
- serde_impl
- serde_test
Adding inflector v0.11.4 to dependencies.
- Features:
+ Features as of v0.11.4:
+ heavyweight
+ lazy_static
+ regex
Adding cargo-list-test-fixture-dependency (local) to build-dependencies.
- Features:
+ Features as of v0.0.0:
- one
- two
Adding foo (workspace) to dependencies.
- Features:
+ Features as of v0.0.0:
+ default-base
+ default-merge-base
+ default-test-base
Adding cargo-list-test-fixture-dependency (local) to dev-dependencies.
- Features:
+ Features as of v0.0.0:
- one
- two
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ eyes
- ears
- mouth
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
- ears
- eyes
- mouth
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ eyes
+ nose
- ears
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ eyes
- ears
- mouth
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ eyes
+ nose
- ears
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ noze
- ears
- eyes
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
- ears
- eyes
- mouth
Adding your-face (local) to dependencies.
- Features:
+ Features as of v0.1.3:
+ mouth
+ nose
- eyes
Adding your-face (local) to dependencies.
- Features:
+ Features as of v0.1.3:
- eyes
- mouth
- nose
Adding foo (workspace) to dependencies.
- Features:
+ Features as of v0.0.0:
+ default-base
+ default-merge-base
+ default-test-base
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ eyes
+ nose
- ears
Adding foo (workspace) to dependencies.
- Features:
+ Features as of v0.0.0:
+ test
Updating `dummy-registry` index
Adding unrelateed-crate v99999.0.0 to dependencies.
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ ears
+ eyes
+ mouth
Adding your-face (local) to dev-dependencies.
- Features:
+ Features as of v0.0.0:
+ mouth
+ nose
Adding your-face (local) to optional dependencies.
- Features:
+ Features as of v0.0.0:
+ mouth
+ nose
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
- ears
- eyes
- mouth
Adding your-face (local) to optional dependencies.
- Features:
+ Features as of v0.0.0:
+ mouth
+ nose
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
+ eyes
+ nose
- ears
Adding foo (local) to dependencies.
- Features:
+ Features as of v0.0.0:
+ default-base
+ default-merge-base
+ default-test-base
Updating `dummy-registry` index
Adding your-face v99999.0.0 to dependencies.
- Features:
+ Features as of v99999.0.0+my-package:
- ears
- eyes
- mouth
Adding foo (workspace) to dependencies.
- Features:
+ Features as of v0.0.0:
+ default-base
+ default-merge-base
+ default-test-base