Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to ntex 1.1 #12

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p>

[![Build Status](https://github.com/ntex-rs/ntex-extras/workflows/CI%20(Linux)/badge.svg)](https://travis-ci.org/ntex-rs/ntex)
[![Version](https://img.shields.io/badge/rustc-1.65+-lightgray.svg)](https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html)
[![Version](https://img.shields.io/badge/rustc-1.75+-lightgray.svg)](https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html)
[![codecov](https://codecov.io/gh/ntex-rs/ntex-extras/branch/master/graph/badge.svg)](https://codecov.io/gh/ntex-rs/ntex-extras)

</p>
Expand Down
4 changes: 2 additions & 2 deletions ntex-cors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ name = "ntex_cors"
path = "src/lib.rs"

[dependencies]
ntex = "1.0"
ntex = "1.1"
derive_more = "0.99"
futures = "0.3"

[dev-dependencies]
ntex = { version = "1.0", features=["tokio"] }
ntex = { version = "1.1", features=["tokio"] }
4 changes: 2 additions & 2 deletions ntex-files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name = "ntex_files"
path = "src/lib.rs"

[dependencies]
ntex = "1.0"
ntex = "1.1"
ntex-http = "0.1.12"
bitflags = "2.1"
futures = "0.3"
Expand All @@ -34,4 +34,4 @@ language-tags = "0.3"
httpdate = "1.0"

[dev-dependencies]
ntex = { version = "1.0", features = ["tokio", "openssl", "compress"] }
ntex = { version = "1.1", features = ["tokio", "openssl", "compress"] }
4 changes: 2 additions & 2 deletions ntex-identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ default = ["cookie-policy"]
cookie-policy = ["cookie/secure", "ntex/cookie"]

[dependencies]
ntex = "1.0"
ntex = "1.1"
futures = "0.3"
serde = "1.0"
serde_json = "1.0"
Expand All @@ -30,4 +30,4 @@ cookie = { version = "0.18", features = ["private"] }
time = { version = "0.3", default-features = false, features = ["std"] }

[dev-dependencies]
ntex = { version = "1.0", features=["tokio"] }
ntex = { version = "1.1", features=["tokio"] }
4 changes: 2 additions & 2 deletions ntex-multipart/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name = "ntex_multipart"
path = "src/lib.rs"

[dependencies]
ntex = "1.0"
ntex = "1.1"
derive_more = "0.99"
httparse = "1.3"
futures = "0.3"
Expand All @@ -25,4 +25,4 @@ mime = "0.3"
twoway = "0.2"

[dev-dependencies]
ntex = { version = "1.0", features=["tokio"] }
ntex = { version = "1.1", features=["tokio"] }
4 changes: 2 additions & 2 deletions ntex-multipart/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Error and Result module
use derive_more::{Display, From};
use ntex::http::error::{ParseError, PayloadError};
use ntex::http::error::{DecodeError, PayloadError};
use ntex::http::StatusCode;
use ntex::web::error::{DefaultError, WebResponseError};

Expand All @@ -24,7 +24,7 @@ pub enum MultipartError {
Incomplete,
/// Error during field parsing
#[display(fmt = "{}", _0)]
Parse(ParseError),
Decode(DecodeError),
/// Payload error
#[display(fmt = "{}", _0)]
Payload(PayloadError),
Expand Down
10 changes: 5 additions & 5 deletions ntex-multipart/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::{cmp, convert::TryFrom, fmt, marker::PhantomData, pin::Pin, rc::Rc};

use futures::stream::{LocalBoxStream, Stream, StreamExt};
use ntex::http::error::{ParseError, PayloadError};
use ntex::http::error::{DecodeError, PayloadError};
use ntex::http::header::{self, HeaderMap, HeaderName, HeaderValue};
use ntex::task::LocalWaker;
use ntex::util::{Bytes, BytesMut};
Expand Down Expand Up @@ -134,16 +134,16 @@
if let Ok(value) = HeaderValue::try_from(h.value) {
headers.append(name, value);
} else {
return Err(ParseError::Header.into());
return Err(DecodeError::Header.into());
}
} else {
return Err(ParseError::Header.into());
return Err(DecodeError::Header.into());
}
}
Ok(Some(headers))
}
Ok(httparse::Status::Partial) => Err(ParseError::Header.into()),
Err(err) => Err(ParseError::from(err).into()),
Ok(httparse::Status::Partial) => Err(DecodeError::Header.into()),
Err(err) => Err(DecodeError::from(err).into()),
}
}
}
Expand Down Expand Up @@ -754,7 +754,7 @@
use futures::future::lazy;
use ntex::channel::mpsc;
use ntex::http::h1::Payload;
use ntex::util::Bytes;

Check warning on line 757 in ntex-multipart/src/server.rs

View workflow job for this annotation

GitHub Actions / nightly - x86_64-apple-darwin

the item `Bytes` is imported redundantly

Check warning on line 757 in ntex-multipart/src/server.rs

View workflow job for this annotation

GitHub Actions / nightly - x86_64-unknown-linux-gnu

the item `Bytes` is imported redundantly

Check warning on line 757 in ntex-multipart/src/server.rs

View workflow job for this annotation

GitHub Actions / nightly - x86_64-pc-windows-msvc

the item `Bytes` is imported redundantly

#[ntex::test]
async fn test_boundary() {
Expand Down
4 changes: 2 additions & 2 deletions ntex-session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ default = ["cookie-session"]
cookie-session = ["cookie/secure", "ntex/cookie"]

[dependencies]
ntex = "1.0"
ntex = "1.1"
cookie = "0.18"
derive_more = "0.99"
futures = "0.3"
Expand All @@ -31,4 +31,4 @@ serde_json = "1.0"
time = { version = "0.3", default-features = false, features = ["std"] }

[dev-dependencies]
ntex = { version = "1.0", features=["tokio"] }
ntex = { version = "1.1", features=["tokio"] }
Loading