mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 04:58:42 +00:00
Rename binstall_v1::Entry
to Item
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
f0b6b7b1af
commit
c6c5dcd79f
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ use crate::binstall::MetaData;
|
||||||
use crate::FileLock;
|
use crate::FileLock;
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct Entry {
|
pub struct Item {
|
||||||
pub name: CompactString,
|
pub name: CompactString,
|
||||||
pub version_req: CompactString,
|
pub version_req: CompactString,
|
||||||
pub current_version: Version,
|
pub current_version: Version,
|
||||||
|
@ -24,7 +24,7 @@ pub struct Entry {
|
||||||
pub target: CompactString,
|
pub target: CompactString,
|
||||||
pub bins: Vec<CompactString>,
|
pub bins: Vec<CompactString>,
|
||||||
}
|
}
|
||||||
impl Entry {
|
impl Item {
|
||||||
pub fn new(metadata: MetaData) -> Self {
|
pub fn new(metadata: MetaData) -> Self {
|
||||||
let MetaData {
|
let MetaData {
|
||||||
bins,
|
bins,
|
||||||
|
@ -87,7 +87,7 @@ pub enum Error {
|
||||||
|
|
||||||
pub fn append_to_path<Iter>(path: impl AsRef<Path>, iter: Iter) -> Result<(), Error>
|
pub fn append_to_path<Iter>(path: impl AsRef<Path>, iter: Iter) -> Result<(), Error>
|
||||||
where
|
where
|
||||||
Iter: IntoIterator<Item = Entry>,
|
Iter: IntoIterator<Item = Item>,
|
||||||
{
|
{
|
||||||
let file = FileLock::new_exclusive(
|
let file = FileLock::new_exclusive(
|
||||||
fs::OpenOptions::new()
|
fs::OpenOptions::new()
|
||||||
|
|
Loading…
Add table
Reference in a new issue