commit aba44240a539199d9fb13bd6ce7eca116f48ffa2
parent 53d2f0d947fda7da50067923a9b2ce2e7bf21fdc
Author: Matt Brubeck <mbrubeck@limpet.net>
Date: Sat, 30 Mar 2024 18:27:42 -0700
cargo fmt
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/tests.rs b/tests/tests.rs
@@ -13,7 +13,6 @@
//! You should have received a copy of the GNU General Public License
//! along with this program. If not, see <https://www.gnu.org/licenses/>.
-use trotter::{Actor, Response, Status};
use rustls::{pki_types::CertificateDer, ClientConnection, RootCertStore};
use std::convert::TryInto;
use std::io::{BufRead, BufReader, Read, Write};
@@ -24,6 +23,7 @@ use std::sync::atomic::{AtomicU16, Ordering};
use std::thread::sleep;
use std::time::Duration;
use tokio_rustls::rustls;
+use trotter::{Actor, Response, Status};
use url::Url;
static BINARY_PATH: &str = env!("CARGO_BIN_EXE_agate");
@@ -151,7 +151,10 @@ fn get(args: &[&str], url: &str) -> Result<Response, String> {
let actor = Actor::default().proxy("localhost".into(), server.addr.port());
let request = actor.get(url);
- let response = tokio::runtime::Runtime::new().unwrap().block_on(request).map_err(|e| e.to_string());
+ let response = tokio::runtime::Runtime::new()
+ .unwrap()
+ .block_on(request)
+ .map_err(|e| e.to_string());
server.stop()?;
response
}
@@ -235,10 +238,7 @@ fn symlink_directory() {
assert_eq!(page.status, Status::Success.value());
assert_eq!(page.meta, "text/gemini");
- assert_eq!(
- page.content,
- include_bytes!("data/symlinked_dir/file.gmi")
- );
+ assert_eq!(page.content, include_bytes!("data/symlinked_dir/file.gmi"));
}
#[test]