File tree 3 files changed +56
-26
lines changed
3 files changed +56
-26
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ - main
8
+ pull_request :
9
+
10
+ env :
11
+ # minimum supported rust version
12
+ MSRV : 1.46.0
13
+
14
+ jobs :
15
+ check :
16
+ name : Check
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v2
20
+ - run : rustup override set ${{env.MSRV}}
21
+ - run : cargo check --workspace --all-targets
22
+ env :
23
+ RUSTFLAGS : " -D warnings"
24
+
25
+ tests :
26
+ name : Tests
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v2
30
+ - run : rustup override set ${{env.MSRV}}
31
+ - run : cargo test --workspace
32
+
33
+ fmt :
34
+ name : Rustfmt
35
+ runs-on : ubuntu-latest
36
+ steps :
37
+ - uses : actions/checkout@v2
38
+ - run : rustup override set ${{env.MSRV}}
39
+ - run : rustup component add rustfmt
40
+ - run : cargo fmt --all -- --check
41
+
42
+ clippy :
43
+ name : Clippy
44
+ runs-on : ubuntu-latest
45
+ steps :
46
+ - uses : actions/checkout@v2
47
+ - run : rustup override set ${{env.MSRV}}
48
+ - run : rustup component add clippy
49
+ - run : cargo clippy --workspace -- --deny warnings
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -87,13 +87,17 @@ pub type Extensions = typemap::TypeMap;
87
87
88
88
pub trait RequestExt {
89
89
/// The elapsed time since the start of the request (headers received)
90
- ///
90
+ ///
91
91
/// # Panics
92
- ///
92
+ ///
93
93
/// This method may panic if the server does not add `StartInstant` to the
94
94
/// request extensions, or if it has been removed by the application.
95
95
fn elapsed ( & self ) -> Duration {
96
- self . extensions ( ) . find :: < StartInstant > ( ) . unwrap ( ) . 0 . elapsed ( )
96
+ self . extensions ( )
97
+ . find :: < StartInstant > ( )
98
+ . unwrap ( )
99
+ . 0
100
+ . elapsed ( )
97
101
}
98
102
99
103
/// The version of HTTP being used
You can’t perform that action at this time.
0 commit comments