Skip to content

Commit

Permalink
fix: require that resources, abilities, and caveats are Send + Sync
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Krüger <[email protected]>
  • Loading branch information
QuinnWilton and matheus23 committed Oct 6, 2023
1 parent fafd183 commit 297ba2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/semantics/ability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use dyn_clone::{clone_trait_object, DynClone};
use super::caveat::Caveat;

/// An ability defined as part of a semantics
pub trait Ability: Display + DynClone + Downcast + 'static {
pub trait Ability: Send + Sync + Display + DynClone + Downcast + 'static {
/// Returns true if self is a valid attenuation of other
fn is_valid_attenuation(&self, other: &dyn Ability) -> bool;

Expand Down
2 changes: 1 addition & 1 deletion src/semantics/caveat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use erased_serde::serialize_trait_object;
use serde::{Deserialize, Serialize};

/// A caveat defined as part of a semantics
pub trait Caveat: DynClone + Downcast + erased_serde::Serialize + 'static {
pub trait Caveat: Send + Sync + DynClone + Downcast + erased_serde::Serialize + 'static {
/// Returns true if the caveat is valid
fn is_valid(&self) -> bool;

Expand Down
2 changes: 1 addition & 1 deletion src/semantics/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use downcast_rs::{impl_downcast, Downcast};
use dyn_clone::{clone_trait_object, DynClone};

/// A resource defined as part of a semantics
pub trait Resource: Display + DynClone + Downcast + 'static {
pub trait Resource: Send + Sync + Display + DynClone + Downcast + 'static {
/// Returns true if self is a valid attenuation of other
fn is_valid_attenuation(&self, other: &dyn Resource) -> bool;
}
Expand Down

0 comments on commit 297ba2e

Please sign in to comment.