File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2424 <p local-class =" copy-help" >Add the following line to your Cargo.toml file:</p >
2525 {{ #if (is-clipboard-supported )}}
2626 <CopyButton
27- @copyText =' {{ @crate.name }} = " {{ @version.num }} " '
27+ @copyText ={{ this.tomlSnippet }}
2828 title =" Copy Cargo.toml snippet to clipboard"
2929 local-class =" copy-button"
3030 >
31- <span >{{ @crate.name }} = " {{ @version.num }} " </span >
31+ <span >{{ this.tomlSnippet }} </span >
3232 {{ svg-jar " copy" aria-hidden =" true" local-class =" copy-icon" }}
3333 </CopyButton >
3434 {{ else }}
3535 <code local-class =" copy-fallback" >
36- {{ @crate.name }} = " {{ @version.num }} "
36+ {{ this.tomlSnippet }}
3737 </code >
3838 {{ /if }}
3939 </div >
Original file line number Diff line number Diff line change @@ -21,4 +21,8 @@ export default class DownloadGraph extends Component {
2121 }
2222
2323 @gt ( 'sortedVersions.length' , NUM_VERSIONS ) hasMoreVersions ;
24+
25+ get tomlSnippet ( ) {
26+ return `${ this . args . crate . name } = "${ this . args . version . num } "` ;
27+ }
2428}
You can’t perform that action at this time.
0 commit comments