Skip to content

Commit 64cdaa9

Browse files
committed
crate.version: Inline crateTomlText property
1 parent 7f49c42 commit 64cdaa9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/controllers/crate/version.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ export default Controller.extend({
2626
crate: alias('model.crate'),
2727
requestedVersion: alias('model.requestedVersion'),
2828
currentVersion: alias('model.version'),
29-
crateTomlText: computed('crate.name', 'currentVersion.num', function () {
30-
return `${this.get('crate.name')} = "${this.get('currentVersion.num')}"`;
31-
}),
29+
3230
keywords: alias('crate.keywords'),
3331
categories: alias('crate.categories'),
3432
badges: alias('crate.badges'),

app/templates/crate/version.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
{{else}}
5252
<div local-class='install'>
5353
<div local-class='install-action'>Cargo.toml</div>
54-
<code>{{ this.crateTomlText }}</code>
54+
<code>{{this.crate.name}} = "{{this.currentVersion.num}}"</code>
5555
{{#if (is-clipboard-supported)}}
56-
<CrateTomlCopy @copyText={{this.crateTomlText}} />
56+
<CrateTomlCopy @copyText='{{this.crate.name}} = "{{this.currentVersion.num}}"' />
5757
{{/if}}
5858
</div>
5959
{{#if this.readme}}

0 commit comments

Comments
 (0)