File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ edition = "2021"
9
9
license = " Apache-2.0"
10
10
homepage = " https://github.com/nginx/ngx-rust"
11
11
repository = " https://github.com/nginx/ngx-rust"
12
- rust-version = " 1.79 .0"
12
+ rust-version = " 1.81 .0"
13
13
14
14
[package ]
15
15
name = " ngx"
@@ -33,7 +33,6 @@ default = ["vendored","std"]
33
33
# If no `std` flag, `alloc` crate is internally used instead. This flag is mainly for `no_std` build.
34
34
alloc = []
35
35
# Enables the components using `std` crate.
36
- # Currently the only difference to `alloc` flag is `std::error::Error` implementation.
37
36
std = [" alloc" ]
38
37
# Build our own copy of the NGINX by default.
39
38
# This could be disabled with `--no-default-features` to minimize the dependency
Original file line number Diff line number Diff line change
1
+ use core:: error;
1
2
use core:: ffi:: { c_char, c_void} ;
2
3
use core:: fmt;
3
4
use core:: ptr;
@@ -13,8 +14,7 @@ pub enum MergeConfigError {
13
14
NoValue ,
14
15
}
15
16
16
- #[ cfg( feature = "std" ) ]
17
- impl std:: error:: Error for MergeConfigError { }
17
+ impl error:: Error for MergeConfigError { }
18
18
19
19
impl fmt:: Display for MergeConfigError {
20
20
fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
Original file line number Diff line number Diff line change
1
+ use core:: error;
1
2
use core:: ffi:: c_void;
2
3
use core:: fmt;
3
4
use core:: ptr:: NonNull ;
@@ -711,8 +712,7 @@ impl fmt::Display for InvalidMethod {
711
712
}
712
713
}
713
714
714
- #[ cfg( feature = "std" ) ]
715
- impl std:: error:: Error for InvalidMethod { }
715
+ impl error:: Error for InvalidMethod { }
716
716
717
717
#[ derive( Clone , PartialEq , Eq , Hash ) ]
718
718
enum MethodInner {
Original file line number Diff line number Diff line change 1
- use core:: fmt;
1
+ use core:: { error , fmt} ;
2
2
3
3
use crate :: core:: Status ;
4
4
use crate :: ffi:: * ;
@@ -28,8 +28,7 @@ impl fmt::Display for InvalidHTTPStatusCode {
28
28
}
29
29
}
30
30
31
- #[ cfg( feature = "std" ) ]
32
- impl std:: error:: Error for InvalidHTTPStatusCode { }
31
+ impl error:: Error for InvalidHTTPStatusCode { }
33
32
34
33
impl From < HTTPStatus > for Status {
35
34
fn from ( val : HTTPStatus ) -> Self {
You can’t perform that action at this time.
0 commit comments