Compare commits

..

3 commits

Author SHA1 Message Date
db7d803f25 build: remove unlinked files
UNLINK
2024-11-08 19:11:23 +00:00
68b930a542 feat(network)!: remove legacy network interface
Some checks failed
Rust / build (map[name:nightly]) (push) Failing after 23s
Rust / build (map[name:stable]) (push) Failing after 45s
2024-11-08 19:11:23 +00:00
c81fe6753f feat(net)!: fluent api
All checks were successful
Rust / build (map[name:stable]) (push) Successful in 1m37s
Rust / build (map[name:nightly]) (push) Successful in 1m57s
Release Please / Release-plz (push) Successful in 27s
Closes kemitix/kxio#43
2024-11-08 19:11:23 +00:00
2 changed files with 7 additions and 5 deletions

View file

@ -1,16 +1,15 @@
//! Provides a generic interface for network operations.
//!
//!
//!
//!
mod system;
mod result;
mod system;
pub use result::{Error, Result};
pub use system::{MatchOn, Net};
use system::{Mocked, Unmocked};
/// Creates a new `Net`.
pub const fn new() -> Net<Unmocked> {
Net::<Unmocked>::new()

View file

@ -43,7 +43,10 @@ async fn test_get_wrong_url() {
net.on(request).respond(my_response.into());
//when
let_assert!(Err(Error::UnexpectedMockRequest(invalid_request)) = net.send(client.get("https://some.other.url/")).await);
let_assert!(
Err(Error::UnexpectedMockRequest(invalid_request)) =
net.send(client.get("https://some.other.url/")).await
);
//then
assert_eq!(invalid_request.url().to_string(), "https://some.other.url/");