radicle: remove unnecessary constraints

The constraints on some of the `cob` related traits are unnecessary, so this
patch removes them.
This commit is contained in:
Fintan Halpenny 2025-07-03 14:08:06 +01:00 committed by Erik Kundt
parent 895ca5d025
commit 38ff2652b1
2 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ impl<T> CollaborativeObject<T> {
}
/// An object that can be built by evaluating a history.
pub trait Evaluate<R>: Sized + Debug + 'static {
pub trait Evaluate<R>: Sized {
type Error: std::error::Error + Send + Sync + 'static;
/// Initialize the object with the first (root) history entry.

View File

@ -17,7 +17,7 @@ use crate::storage::git as storage;
use crate::storage::SignRepository;
use crate::{cob, identity};
pub trait CobAction: Debug {
pub trait CobAction {
/// Parent objects this action depends on. For example, patch revisions
/// have the commit objects as their parent.
fn parents(&self) -> Vec<git::Oid> {
@ -43,7 +43,7 @@ pub trait CobAction: Debug {
}
/// A collaborative object. Can be materialized from an operation history.
pub trait Cob: Sized + PartialEq + Debug {
pub trait Cob: Sized {
/// The underlying action composing each operation.
type Action: CobAction + for<'de> Deserialize<'de> + Serialize;
/// Error returned by `apply` function.
@ -331,7 +331,7 @@ where
impl<'a, T, R> Store<'a, T, R>
where
R: ReadRepository + cob::Store,
T: Cob + cob::Evaluate<R>,
T: Cob + cob::Evaluate<R> + 'a,
T::Action: Serialize,
{
/// Get an object.