Skip to content

Commit

Permalink
chore: upgrade to ntex 1.1 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
leon3s authored Feb 28, 2024
1 parent 7b8a385 commit b725666
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
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::task::{Context, Poll};
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 @@ impl InnerMultipart {
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
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"] }

0 comments on commit b725666

Please sign in to comment.