mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix warnings
This commit is contained in:
parent
8220564fa6
commit
b4fe69be22
@ -4,7 +4,7 @@ use std::time::SystemTime;
|
||||
use crate::DISCORD_INSTANCE;
|
||||
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::{mpsc, Mutex, MutexGuard};
|
||||
use std::sync::{mpsc, Mutex};
|
||||
use std::thread;
|
||||
use std::thread::JoinHandle;
|
||||
|
||||
@ -35,7 +35,7 @@ pub fn run() -> Mutex<DiscordState> {
|
||||
Mutex::new(DiscordState {
|
||||
tx,
|
||||
thread: Some(thread::spawn(move || {
|
||||
let mut rpc: RPC = match RPC::init::<Handlers>(DISCORD_APPLICATION_ID, true, None) {
|
||||
let rpc: RPC = match RPC::init::<Handlers>(DISCORD_APPLICATION_ID, true, None) {
|
||||
Ok(rpc) => rpc,
|
||||
Err(e) => {
|
||||
log::error!("failed to initiate discord_game_sdk: {}", e);
|
||||
@ -134,7 +134,7 @@ impl EventHandlers for Handlers {
|
||||
|
||||
pub fn send_all(updates: Vec<DiscordUpdate>) {
|
||||
match DISCORD_INSTANCE.lock() {
|
||||
Ok(mut disc) => {
|
||||
Ok(disc) => {
|
||||
for update in updates {
|
||||
let _ = disc.tx.send(update);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ extern crate lazy_static;
|
||||
pub mod discord;
|
||||
|
||||
#[cfg(feature = "discord")]
|
||||
use std::sync::{mpsc::Sender, Mutex};
|
||||
use std::sync::Mutex;
|
||||
|
||||
#[macro_use]
|
||||
pub mod ui;
|
||||
@ -128,7 +128,7 @@ fn main() {
|
||||
#[cfg(feature = "discord")]
|
||||
{
|
||||
match DISCORD_INSTANCE.lock() {
|
||||
Ok(disc) => {
|
||||
Ok(_disc) => {
|
||||
//great
|
||||
}
|
||||
Err(e) => log::error!("Couldn't init discord: {}", e),
|
||||
|
Loading…
Reference in New Issue
Block a user