Run cargo fix --edition
This commit is contained in:
parent
ffd6f7bcf5
commit
389e5bb700
@ -585,7 +585,6 @@ where
|
||||
{
|
||||
pub fn to_unbounded_sender<T>(&self) -> mpsc::UnboundedSender<T>
|
||||
where
|
||||
InternalDaemonEvent: From<E>,
|
||||
T: Send + 'static,
|
||||
E: From<T>,
|
||||
{
|
||||
@ -593,12 +592,10 @@ where
|
||||
let sender = self.sender.clone();
|
||||
tokio::spawn(async move {
|
||||
while let Some(msg) = rx.next().await {
|
||||
if let Some(tx) = sender.upgrade() {
|
||||
let e: E = E::from(msg);
|
||||
if tx.send(e.into()).is_err() {
|
||||
let Some(tx) = sender.upgrade() else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
};
|
||||
if tx.send(InternalDaemonEvent::from(E::from(msg))).is_err() {
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ pub enum Error {
|
||||
|
||||
/// Throw a Java exception and return if `result` is an error
|
||||
macro_rules! ok_or_throw {
|
||||
($env:expr, $result:expr) => {{
|
||||
($env:expr_2021, $result:expr_2021) => {{
|
||||
match $result {
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
|
@ -35,8 +35,8 @@ const MAX_SEND_ATTEMPTS: usize = 3;
|
||||
/// Custom macro to write a line to an output formatter that uses platform-specific newline
|
||||
/// character sequences.
|
||||
macro_rules! write_line {
|
||||
($fmt:expr $(,)*) => { write!($fmt, "{}", LINE_SEPARATOR) };
|
||||
($fmt:expr, $pattern:expr $(, $arg:expr)* $(,)*) => {
|
||||
($fmt:expr_2021 $(,)*) => { write!($fmt, "{}", LINE_SEPARATOR) };
|
||||
($fmt:expr_2021, $pattern:expr_2021 $(, $arg:expr_2021)* $(,)*) => {
|
||||
write!($fmt, $pattern, $( $arg ),*)
|
||||
.and_then(|_| write!($fmt, "{}", LINE_SEPARATOR))
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user