Skip to content

Commit

Permalink
Merge branch 'CommandBuilder' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasVousten committed Aug 22, 2023
2 parents 4e78015 + b7f9ca9 commit 3f07004
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct CommandBuilder {
}

impl CommandBuilder {
pub fn from_type(command_type: CommandType) -> Box<dyn QueryCommand + Sync> {
pub fn from_type(command_type: CommandType) -> Box<dyn QueryCommand + Sync + Send> {

Check warning on line 43 in src/command.rs

View workflow job for this annotation

GitHub Actions / Check

missing documentation for an associated function

Check failure on line 43 in src/command.rs

View workflow job for this annotation

GitHub Actions / Clippy

missing documentation for an associated function

Check warning on line 43 in src/command.rs

View workflow job for this annotation

GitHub Actions / Test

missing documentation for an associated function
match command_type {
CommandType::MajorBody => Box::new(MajorBodyCommand {}),
CommandType::Vector => Box::<Command<VectorCommand>>::default(),
Expand All @@ -63,7 +63,7 @@ impl CommandBuilder {
pub fn build_with_type(
&self,
command_type: CommandType,
) -> Result<Box<dyn QueryCommand + Sync>, CommandTypeError> {
) -> Result<Box<dyn QueryCommand + Sync + Send>, CommandTypeError> {
match command_type {
CommandType::Vector => Ok(Box::new(Command::<VectorCommand> {
id: self.id,
Expand Down Expand Up @@ -159,7 +159,7 @@ trait Query {
}

#[async_trait]
impl<T: QueryCommand + Sync + ?Sized> Query for T {
impl<T: QueryCommand + Sync + Send + ?Sized> Query for T {
async fn query(&self) -> Result<Vec<String>, HorizonsQueryError> {
client::query(&self.get_parameters()).await
}
Expand Down

0 comments on commit 3f07004

Please sign in to comment.