Skip to content

Commit

Permalink
Fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimach committed Apr 12, 2024
1 parent 45ffcee commit 0645668
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Jobs {
}

thread_local! {
static JOBS: RefCell<Option<Jobs>> = const { RefCell::new(None) };
static JOBS: RefCell<Option<Jobs>> = RefCell::new(None);
}

pub fn start<F: FnOnce() -> Output + Send + 'static>(f: F) -> JobId {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![forbid(unsafe_op_in_unsafe_fn)]

#[allow(clippy::thread_local_initializer_can_be_made_const)]
#[macro_use]
mod byond;
#[allow(dead_code)]
Expand Down
4 changes: 2 additions & 2 deletions src/redis_pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::time::Duration;
const ERROR_CHANNEL: &str = "RUSTG_REDIS_ERROR_CHANNEL";

thread_local! {
static REQUEST_SENDER: RefCell<Option<flume::Sender<PubSubRequest>>> = const { RefCell::new(None) };
static RESPONSE_RECEIVER: RefCell<Option<flume::Receiver<PubSubResponse>>> = const { RefCell::new(None) };
static REQUEST_SENDER: RefCell<Option<flume::Sender<PubSubRequest>>> = RefCell::new(None);
static RESPONSE_RECEIVER: RefCell<Option<flume::Receiver<PubSubResponse>>> = RefCell::new(None);
}

enum PubSubRequest {
Expand Down
2 changes: 1 addition & 1 deletion src/redis_reliablequeue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::num::NonZeroUsize;
use std::time::Duration;

thread_local! {
static REDIS_CLIENT: RefCell<Option<Client>> = const { RefCell::new(None) };
static REDIS_CLIENT: RefCell<Option<Client>> = RefCell::new(None);
}

fn connect(addr: &str) -> Result<(), RedisError> {
Expand Down

0 comments on commit 0645668

Please sign in to comment.