File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -325,13 +325,24 @@ uuid = "1.0"
325
325
uuid = { git = ' https://github.com/rust-lang-nursery/uuid' }
326
326
```
327
327
328
- Remember that ` [patch] ` is only applicable at the * top level * so we consumers of
329
- ` my-library ` have to repeat the ` [patch] ` section if necessary. Here, though,
330
- the new ` uuid ` crate applies to * both* our dependency on ` uuid ` and the
331
- ` my-library -> uuid ` dependency. The ` uuid ` crate will be resolved to one
332
- version for this entire crate graph, 1.0.1, and it'll be pulled from the git
328
+ Remember that ` [patch] ` is applicable * transitively * but can only be defined at
329
+ the * top level * so we consumers of ` my-library ` have to repeat the ` [patch] ` section
330
+ if necessary. Here, though, the new ` uuid ` crate applies to * both* our dependency on
331
+ ` uuid ` and the ` my-library -> uuid ` dependency. The ` uuid ` crate will be resolved to
332
+ one version for this entire crate graph, 1.0.1, and it'll be pulled from the git
333
333
repository.
334
334
335
+ #### Overriding repository URL
336
+
337
+ In case the dependency you want to override isn't loaded from ` crates.io ` , you'll have to change a bit how you use ` [patch] ` :
338
+
339
+ ``` toml
340
+ [patch ."https://github .com/your/repository" ]
341
+ my-library = { path = " ../my-library/path" }
342
+ ```
343
+
344
+ And that's it!
345
+
335
346
### Prepublishing a breaking change
336
347
337
348
As a final scenario, let's take a look at working with a new major version of a
You can’t perform that action at this time.
0 commit comments