mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 12:35:28 +00:00
cargo fmt
This commit is contained in:
parent
53d2f0d947
commit
aba44240a5
1 changed files with 6 additions and 6 deletions
|
|
@ -13,7 +13,6 @@
|
||||||
//! You should have received a copy of the GNU General Public License
|
//! You should have received a copy of the GNU General Public License
|
||||||
//! along with this program. If not, see <https://www.gnu.org/licenses/>.
|
//! 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 rustls::{pki_types::CertificateDer, ClientConnection, RootCertStore};
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
use std::io::{BufRead, BufReader, Read, Write};
|
use std::io::{BufRead, BufReader, Read, Write};
|
||||||
|
|
@ -24,6 +23,7 @@ use std::sync::atomic::{AtomicU16, Ordering};
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tokio_rustls::rustls;
|
use tokio_rustls::rustls;
|
||||||
|
use trotter::{Actor, Response, Status};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
static BINARY_PATH: &str = env!("CARGO_BIN_EXE_agate");
|
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 actor = Actor::default().proxy("localhost".into(), server.addr.port());
|
||||||
let request = actor.get(url);
|
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()?;
|
server.stop()?;
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
|
|
@ -235,10 +238,7 @@ fn symlink_directory() {
|
||||||
|
|
||||||
assert_eq!(page.status, Status::Success.value());
|
assert_eq!(page.status, Status::Success.value());
|
||||||
assert_eq!(page.meta, "text/gemini");
|
assert_eq!(page.meta, "text/gemini");
|
||||||
assert_eq!(
|
assert_eq!(page.content, include_bytes!("data/symlinked_dir/file.gmi"));
|
||||||
page.content,
|
|
||||||
include_bytes!("data/symlinked_dir/file.gmi")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue