Skip to content

Commit

Permalink
fix: AuthProvider is now ?Send on wasm32
Browse files Browse the repository at this point in the history
  • Loading branch information
simbleau committed Oct 22, 2023
1 parent 5c5d7c5 commit 5e19c69
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This changelog follows the patterns described here: <https://keepachangelog.com/

Subheadings to categorize changes are `added, changed, deprecated, removed, fixed, security`.

## v1.3.1

### fixed

- `AuthProvider` is now `?Send` on wasm32

## v1.3.0

### changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license = "MIT/Apache-2.0"
repository = "https://github.com/vectorgameexperts/bevy-key-rotation"
authors = ["Spencer C. Imbleau"]
keywords = ["gamedev"]
version = "1.3.0"
version = "1.3.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 2 additions & 2 deletions examples/error_handling.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use async_trait::async_trait;
use bevy::{
log::{self, LogPlugin},
prelude::*,
Expand All @@ -11,7 +10,8 @@ use std::sync::Arc;

pub struct MyAuthProvider;

#[async_trait]
#[cfg_attr(not(target_arch = "wasm32"), bevy_key_rotation::async_trait)]
#[cfg_attr(target_arch = "wasm32", bevy_key_rotation::async_trait(?Send))]
impl AuthProvider for MyAuthProvider {
async fn authenticate(
&self,
Expand Down
4 changes: 2 additions & 2 deletions examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use async_trait::async_trait;
use bevy::{
log::{self, LogPlugin},
prelude::*,
Expand All @@ -11,7 +10,8 @@ use std::sync::Arc;

pub struct MyAuthProvider;

#[async_trait]
#[cfg_attr(not(target_arch = "wasm32"), bevy_key_rotation::async_trait)]
#[cfg_attr(target_arch = "wasm32", bevy_key_rotation::async_trait(?Send))]
impl AuthProvider for MyAuthProvider {
async fn authenticate(
&self,
Expand Down
3 changes: 2 additions & 1 deletion src/data_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use async_trait::async_trait;
use bevy::prelude::*;
use instant::{Duration, Instant};

#[async_trait]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
pub trait AuthProvider {
async fn authenticate(
&self,
Expand Down

0 comments on commit 5e19c69

Please sign in to comment.