radicle: remove verified field in Remote
The `V` parameter of `Remote` is already determined by the `refs` field. The `verified: PhantomData<V>` field is not required. Remove the `verified` field to simplify the `Remote` struct. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
This commit is contained in:
parent
a06ed9f6de
commit
8d80359c38
|
|
@ -2,7 +2,6 @@ pub mod git;
|
||||||
pub mod refs;
|
pub mod refs;
|
||||||
|
|
||||||
use std::collections::hash_map;
|
use std::collections::hash_map;
|
||||||
use std::marker::PhantomData;
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::{fmt, io};
|
use std::{fmt, io};
|
||||||
|
|
@ -178,8 +177,6 @@ pub struct Remote<V> {
|
||||||
pub refs: SignedRefs<V>,
|
pub refs: SignedRefs<V>,
|
||||||
/// Whether this remote is a delegate for the project.
|
/// Whether this remote is a delegate for the project.
|
||||||
pub delegate: bool,
|
pub delegate: bool,
|
||||||
/// Whether the remote is verified or not, ie. whether its signed refs were checked.
|
|
||||||
verified: PhantomData<V>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V> Remote<V> {
|
impl<V> Remote<V> {
|
||||||
|
|
@ -191,7 +188,6 @@ impl<V> Remote<V> {
|
||||||
id,
|
id,
|
||||||
refs: refs.into(),
|
refs: refs.into(),
|
||||||
delegate: false,
|
delegate: false,
|
||||||
verified: PhantomData,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -204,7 +200,6 @@ impl Remote<Unverified> {
|
||||||
id: self.id,
|
id: self.id,
|
||||||
refs,
|
refs,
|
||||||
delegate: self.delegate,
|
delegate: self.delegate,
|
||||||
verified: PhantomData,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -215,7 +210,6 @@ impl Remote<Verified> {
|
||||||
id: self.id,
|
id: self.id,
|
||||||
refs: self.refs.unverified(),
|
refs: self.refs.unverified(),
|
||||||
delegate: self.delegate,
|
delegate: self.delegate,
|
||||||
verified: PhantomData,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue