Skip to content

Commit

Permalink
Fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
alexliesenfeld committed Aug 31, 2024
1 parent f19f209 commit 559c717
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 38 deletions.
18 changes: 6 additions & 12 deletions src/api/adapter/remote.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
use crate::common::data::{ForwardingRuleConfig, ProxyRuleConfig, RecordingRuleConfig};
use std::{borrow::Borrow, net::SocketAddr, sync::Arc};
use crate::{
common::{
data::{ForwardingRuleConfig, ProxyRuleConfig, RecordingRuleConfig}
},
};

use crate::api::{
adapter::{
Expand All @@ -19,14 +15,12 @@ use async_trait::async_trait;
use bytes::Bytes;
use http::{Request, StatusCode};

use crate::{
common::{
data::{
ActiveForwardingRule, ActiveMock, ActiveProxyRule, ActiveRecording, ClosestMatch,
MockDefinition, RequestRequirements,
},
http::HttpClient,
use crate::common::{
data::{
ActiveForwardingRule, ActiveMock, ActiveProxyRule, ActiveRecording, ClosestMatch,
MockDefinition, RequestRequirements,
},
http::HttpClient,
};

pub struct RemoteMockServerAdapter {
Expand Down
2 changes: 1 addition & 1 deletion src/api/proxy.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::{
api::server::MockServer,
common::{
data::RequestRequirements,
data::RecordingRuleConfig,
data::RequestRequirements,
util::{write_file, Join},
},
When,
Expand Down
25 changes: 9 additions & 16 deletions src/api/server.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use crate::api::spec::{Then, When};
#[cfg(feature = "remote")]
use crate::api::RemoteMockServerAdapter;
use crate::api::{
spec::{Then, When},
};
#[cfg(feature = "remote")]
use crate::common::http::HttpMockHttpClient;

Expand All @@ -17,29 +15,24 @@ use crate::{

#[cfg(feature = "proxy")]
use crate::{
api::proxy::{ForwardingRuleBuilder, ForwardingRule, ProxyRuleBuilder, ProxyRule},
api::proxy::{ForwardingRule, ForwardingRuleBuilder, ProxyRule, ProxyRuleBuilder},
common::{
util::read_file_async,
data::{ForwardingRuleConfig, ProxyRuleConfig},
util::read_file_async,
},
};

#[cfg(feature = "record")]
use crate::{
api::{
common::data::RecordingRuleConfig,
mock::MockSet,
proxy::{Recording, RecordingRuleBuilder}
},
use crate::api::{
common::data::RecordingRuleConfig,
mock::MockSet,
proxy::{Recording, RecordingRuleBuilder},
};

#[cfg(feature = "record")]
use std::{path::PathBuf};

use crate::{
server::{state::HttpMockStateManager, HttpMockServerBuilder},
};
use std::path::PathBuf;

use crate::server::{state::HttpMockStateManager, HttpMockServerBuilder};

use crate::Mock;
use async_object_pool::Pool;
Expand Down
6 changes: 2 additions & 4 deletions src/server/builder.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#[cfg(any(feature = "proxy"))]

Check failure on line 1 in src/server/builder.rs

View workflow job for this annotation

GitHub Actions / build-ubuntu-latest-1.74.0

unneeded sub `cfg` when there is only one condition
use crate::common::http::{HttpClient, HttpMockHttpClient};
#[cfg(any(feature = "record", feature = "record"))]
use crate::server::persistence::read_static_mock_definitions;
#[cfg(feature = "https")]
use crate::server::server::MockServerHttpsConfig;
#[cfg(feature = "https")]
use crate::server::tls::{CertificateResolverFactory, GeneratingCertificateResolverFactory};
#[cfg(any(feature = "record", feature = "record"))]
use crate::server::{
persistence::read_static_mock_definitions,
};

use crate::server::{
handler::HttpMockHandler,
Expand Down
6 changes: 1 addition & 5 deletions src/server/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ use crate::{
};

#[cfg(feature = "record")]
use crate::{
server::{
persistence::{deserialize_mock_defs_from_yaml, serialize_mock_defs_to_yaml},
},
};
use crate::server::persistence::{deserialize_mock_defs_from_yaml, serialize_mock_defs_to_yaml};

use crate::common::data::{ForwardingRuleConfig, ProxyRuleConfig, RecordingRuleConfig};
use bytes::Bytes;
Expand Down

0 comments on commit 559c717

Please sign in to comment.