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:
Fintan Halpenny 2022-10-12 11:53:08 +01:00 committed by Alexis Sellier
parent a06ed9f6de
commit 8d80359c38
No known key found for this signature in database
1 changed files with 0 additions and 6 deletions

View File

@ -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,
} }
} }
} }