We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cargo add
1 parent e9e587f commit cae107bCopy full SHA for cae107b
app/components/crate-sidebar.js
@@ -15,7 +15,9 @@ export default class CrateSidebar extends Component {
15
}
16
17
get cargoAddCommand() {
18
- return `cargo add ${this.args.crate.name}`;
+ return this.args.requestedVersion
19
+ ? `cargo add ${this.args.crate.name}@${this.args.requestedVersion}`
20
+ : `cargo add ${this.args.crate.name}`;
21
22
23
get tomlSnippet() {
app/templates/crate/version.hbs
@@ -47,6 +47,7 @@
47
<CrateSidebar
48
@crate={{this.crate}}
49
@version={{this.currentVersion}}
50
+ @requestedVersion={{this.requestedVersion}}
51
local-class="sidebar"
52
/>
53
</div>
0 commit comments