Skip to content

Commit e332930

Browse files
committed
feat(schemas): dep.patches field (unstable)
1 parent 97cc78e commit e332930

File tree

1 file changed

+8
-0
lines changed
  • crates/cargo-util-schemas/src/manifest

1 file changed

+8
-0
lines changed

Diff for: crates/cargo-util-schemas/src/manifest/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,13 @@ pub struct TomlDetailedDependency<P: Clone = String> {
777777
#[serde(rename = "default_features")]
778778
pub default_features2: Option<bool>,
779779
pub package: Option<PackageName>,
780+
/// `patches = [<path>, ...]` for specifying patch files (unstable).
781+
///
782+
/// Paths of patches are relative to the file it appears in.
783+
/// If that's a `Cargo.toml`, they'll be relative to that TOML file,
784+
/// and if it's a `.cargo/config.toml` file, they'll be relative to the
785+
/// parent directory of that file.
786+
pub patches: Option<Vec<P>>,
780787
pub public: Option<bool>,
781788

782789
/// One or more of `bin`, `cdylib`, `staticlib`, `bin:<name>`.
@@ -815,6 +822,7 @@ impl<P: Clone> Default for TomlDetailedDependency<P> {
815822
default_features: Default::default(),
816823
default_features2: Default::default(),
817824
package: Default::default(),
825+
patches: Default::default(),
818826
public: Default::default(),
819827
artifact: Default::default(),
820828
lib: Default::default(),

0 commit comments

Comments
 (0)