mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
chore: edition 2024
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "jsonrpc-example"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,15 +1,11 @@
|
||||
// Allow this lint since it's fine to use type directly in the short example.
|
||||
#![allow(clippy::type_complexity)]
|
||||
|
||||
use std::{
|
||||
error,
|
||||
future::Future,
|
||||
pin::Pin,
|
||||
sync::{Arc, RwLock},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use actix_web::{middleware, web, App, Error, HttpResponse, HttpServer};
|
||||
use actix_web::{App, Error, HttpResponse, HttpServer, middleware, web};
|
||||
use bytes::Bytes;
|
||||
use futures_util::FutureExt as _;
|
||||
use serde_json::Value;
|
||||
@ -88,9 +84,12 @@ async fn rpc_select(
|
||||
|
||||
pub trait ImplNetwork {
|
||||
fn ping(&self) -> String;
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn wait(&self, d: u64) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn error::Error>>>>>;
|
||||
|
||||
fn get(&self) -> u32;
|
||||
|
||||
fn inc(&mut self);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user