-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87462a8
commit 327c930
Showing
4 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// SPDX-FileCopyrightText: © 2024 Foundation Devices, Inc. <[email protected]> | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#![allow(static_mut_refs)] | ||
// #![allow(static_mut_refs)] | ||
|
||
use stratum_v1::{Client, Extensions, Message, Share, VersionRolling}; | ||
|
||
use heapless::{String, Vec}; | ||
use inquire::Select; | ||
use log::{debug, error}; | ||
use log::error; | ||
use std::{ | ||
net::{Ipv4Addr, SocketAddr}, | ||
str::FromStr, | ||
|
@@ -162,23 +162,23 @@ mod adapter { | |
Self { inner } | ||
} | ||
|
||
/// Consume the adapter, returning the inner object. | ||
pub fn into_inner(self) -> T { | ||
self.inner | ||
} | ||
// /// Consume the adapter, returning the inner object. | ||
// pub fn into_inner(self) -> T { | ||
// self.inner | ||
// } | ||
} | ||
|
||
impl<T: ?Sized> FromTokio<T> { | ||
/// Borrow the inner object. | ||
pub fn inner(&self) -> &T { | ||
&self.inner | ||
} | ||
|
||
/// Mutably borrow the inner object. | ||
pub fn inner_mut(&mut self) -> &mut T { | ||
&mut self.inner | ||
} | ||
} | ||
// impl<T: ?Sized> FromTokio<T> { | ||
// /// Borrow the inner object. | ||
// pub fn inner(&self) -> &T { | ||
// &self.inner | ||
// } | ||
|
||
// /// Mutably borrow the inner object. | ||
// pub fn inner_mut(&mut self) -> &mut T { | ||
// &mut self.inner | ||
// } | ||
// } | ||
|
||
impl<T: ?Sized> embedded_io::ErrorType for FromTokio<T> { | ||
type Error = std::io::Error; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters