Skip to content

Commit 7fdb8f0

Browse files
mkroeningfogti
authored andcommitted
refactor: return Self
1 parent 47d7f7a commit 7fdb8f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl<'a> Executor<'a> {
120120
///
121121
/// let ex = Executor::new();
122122
/// ```
123-
pub const fn new() -> Executor<'a> {
123+
pub const fn new() -> Self {
124124
Executor {
125125
state: AtomicPtr::new(std::ptr::null_mut()),
126126
_marker: PhantomData,
@@ -413,7 +413,7 @@ impl Drop for Executor<'_> {
413413
}
414414

415415
impl<'a> Default for Executor<'a> {
416-
fn default() -> Executor<'a> {
416+
fn default() -> Self {
417417
Executor::new()
418418
}
419419
}
@@ -461,7 +461,7 @@ impl<'a> LocalExecutor<'a> {
461461
///
462462
/// let local_ex = LocalExecutor::new();
463463
/// ```
464-
pub const fn new() -> LocalExecutor<'a> {
464+
pub const fn new() -> Self {
465465
LocalExecutor {
466466
inner: Executor::new(),
467467
_marker: PhantomData,
@@ -644,7 +644,7 @@ impl<'a> LocalExecutor<'a> {
644644
}
645645

646646
impl<'a> Default for LocalExecutor<'a> {
647-
fn default() -> LocalExecutor<'a> {
647+
fn default() -> Self {
648648
LocalExecutor::new()
649649
}
650650
}
@@ -669,7 +669,7 @@ struct State {
669669

670670
impl State {
671671
/// Creates state for a new executor.
672-
const fn new() -> State {
672+
const fn new() -> Self {
673673
State {
674674
queue: ConcurrentQueue::unbounded(),
675675
local_queues: RwLock::new(Vec::new()),

0 commit comments

Comments
 (0)