Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Sep 25, 2023
1 parent d6485cf commit 299cfe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion viz-core/tests/type_json.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use viz_core::{types::Json, IntoResponse, ResponseExt, Result};
use viz_core::{types::Json, IntoResponse, ResponseExt};

#[test]
fn json() {
Expand Down
6 changes: 2 additions & 4 deletions viz-core/tests/type_realip.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use viz_core::{
header::{HeaderValue, FORWARDED},
types::RealIp,
Request, RequestExt, Result,
Request, RequestExt,
};

#[test]
fn realip() -> Result<()> {
fn realip() {
let mut req = Request::default();
req.headers_mut()
.insert(RealIp::X_REAL_IP, HeaderValue::from_static("10.10.10.10"));
Expand All @@ -30,6 +30,4 @@ fn realip() -> Result<()> {
req.extensions_mut()
.insert("1.1.1.1:80".parse::<std::net::SocketAddr>().unwrap());
assert_eq!(req.realip(), Some(RealIp("1.1.1.1".parse().unwrap())));

Ok(())
}

0 comments on commit 299cfe9

Please sign in to comment.