Skip to content

Commit 6a024eb

Browse files
committed
Edition 2018 nix
1 parent 2265f73 commit 6a024eb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/scheduler.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ use crate::gpu_hasher::{create_gpu_hasher_thread, GpuTask, SafePointer};
44
#[cfg(feature = "opencl")]
55
use crate::ocl::gpu_init;
66
use crate::plotter::{Buffer, PlotterTask, NONCE_SIZE};
7-
use crossbeam_channel::{unbounded, Receiver, Sender};
7+
use crossbeam_channel::{Receiver, Sender};
8+
#[cfg(feature = "opencl")]
9+
use crossbeam_channel::unbounded;
810
use libc::{c_void, size_t};
911
use std::cmp::min;
1012
use std::sync::mpsc::channel;
@@ -103,7 +105,7 @@ pub fn create_scheduler_thread(
103105
tx.clone(),
104106
CpuTask {
105107
cache: SafeCVoid {
106-
ptr: bs.as_ptr() as *mut c_void,
108+
ptr: bs.as_mut_ptr() as *mut c_void,
107109
},
108110
cache_size: (buffer_size / NONCE_SIZE) as usize,
109111
chunk_offset: requested as usize,

src/utils.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
extern crate fs2;
21
use std::fs::{File, OpenOptions};
32
use std::io;
43
use std::path::Path;
@@ -9,9 +8,9 @@ cfg_if! {
98
extern crate thread_priority;
109
use std::process::Command;
1110
use std::os::unix::fs::OpenOptionsExt;
12-
use utils::fs2::FileExt;
11+
use fs2::FileExt;
1312
#[cfg(linux)]
14-
use self::thread_priority::*;
13+
use thread_priority::*;
1514

1615
const O_DIRECT: i32 = 0o0_040_000;
1716

0 commit comments

Comments
 (0)