Skip to content

Commit b78c530

Browse files
committed
wip
1 parent 174292e commit b78c530

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

frameworks/Rust/ntex/src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl PgConnection {
173173
utils::reserve(&mut body, 4 * 1024);
174174

175175
FortunesTemplate {
176-
fortunes: &*fortunes,
176+
fortunes: &fortunes,
177177
}
178178
.write_call(&mut body);
179179
fortunes.clear();

frameworks/Rust/ntex/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
33

44
use ntex::http::header::{CONTENT_TYPE, SERVER};
5-
use ntex::{http, time::Seconds, util::BytesMut, util::PoolId, util::Ready, web};
5+
use ntex::{http, time::Seconds, util::BytesMut, util::PoolId, web};
66
use sonic_rs::Serialize;
77

88
mod utils;

frameworks/Rust/ntex/src/main_db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use ntex::http::header::{CONTENT_TYPE, SERVER};
66
use ntex::http::{HttpService, KeepAlive, Request, Response, StatusCode};
77
use ntex::service::{Service, ServiceCtx, ServiceFactory};
88
use ntex::web::{Error, HttpResponse};
9-
use ntex::{time::Seconds, util::PoolId, util::Ready};
9+
use ntex::{time::Seconds, util::PoolId};
1010

1111
mod db;
1212
mod utils;

frameworks/Rust/ntex/src/main_plt.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#[global_allocator]
22
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
33

4-
use std::{future::Future, io, pin::Pin, task::Context, task::Poll};
4+
use std::{future::Future, io, pin::Pin, task::ready, task::Context, task::Poll};
55

6-
use ntex::util::{ready, PoolId, Ready};
7-
use ntex::{fn_service, http::h1, io::Io, io::RecvError};
6+
use ntex::{fn_service, http::h1, io::Io, io::RecvError, util::PoolId};
87
use sonic_rs::Serialize;
98

109
mod utils;

frameworks/Rust/ntex/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub fn reserve(buf: &mut BytesMut, lw: usize) {
3434

3535
pub struct BytesWriter<'a>(pub &'a mut BytesMut);
3636

37-
impl<'a> Write for BytesWriter<'a> {
37+
impl Write for BytesWriter<'_> {
3838
fn write(&mut self, src: &[u8]) -> Result<usize, io::Error> {
3939
self.0.extend_from_slice(src);
4040
Ok(src.len())
@@ -45,7 +45,7 @@ impl<'a> Write for BytesWriter<'a> {
4545
}
4646
}
4747

48-
impl<'a> WriteExt for BytesWriter<'a> {
48+
impl WriteExt for BytesWriter<'_> {
4949
#[inline(always)]
5050
fn reserve_with(&mut self, additional: usize) -> Result<&mut [MaybeUninit<u8>], io::Error> {
5151
self.0.reserve(additional);

0 commit comments

Comments
 (0)