mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-14 14:46:37 +00:00
Fix lifetime of CrateToml::add_crate
API
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
01d5dbf234
commit
cf3e7f4113
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ impl CratesToml<'_> {
|
||||||
self.write_to_file(&mut file)
|
self.write_to_file(&mut file)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_crate(&mut self, metadata: &CrateInfo) {
|
pub fn add_crate<'this, 'metadata: 'this>(&'this mut self, metadata: &'metadata CrateInfo) {
|
||||||
let name = &metadata.name;
|
let name = &metadata.name;
|
||||||
let version = &metadata.current_version;
|
let version = &metadata.current_version;
|
||||||
let source = Source::from(&metadata.source);
|
let source = Source::from(&metadata.source);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue