Browse Source

WIP: gempress: fix tests

main
Garrit Franke 3 years ago
parent
commit
fbba2b9b3a
Signed by: garrit
GPG Key ID: 65586C4DDA55EA2C
  1. 4
      lib/gempress/src/gemini.rs
  2. 8
      lib/gempress/src/lib.rs

4
lib/gempress/src/gemini.rs

@ -136,8 +136,8 @@ mod tests {
let raw = "gemini://example.space";
match Request::parse(raw) {
Err(TaurusError::InvalidRequest(_)) => {}
x => panic!("expected TaurusError::InvalidRequest, got: {:?}", x),
Err(GempressError::InvalidRequest(_)) => {}
x => panic!("expected GempressError::InvalidRequest, got: {:?}", x),
}
}
}

8
lib/gempress/src/lib.rs

@ -55,6 +55,10 @@ impl Config {
/// # Examples
///
/// ```
/// use gempress::Gempress;
/// use gempress::gemini;
/// use std::path::PathBuf;
///
/// let config = gempress::Config::from_identity(PathBuf::from("identity.pfx"), "password".into());
/// let mut app = Gempress::new(config);
///
@ -64,7 +68,7 @@ impl Config {
/// }
///
/// // Apply function handler to path
/// app.on("/foo", &foo_handler);
/// app.on("/foo", &index_handler);
///
/// app.listen(1965, || {
/// println!("Listening on port 1965");
@ -112,6 +116,8 @@ impl Gempress {
/// # Examples
///
/// ```
/// use gempress::gemini;
///
/// let config = gempress::Config::from_identity(PathBuf::from("identity.pfx"), "password".into());
/// let mut app = Gempress::new(config);
///

Loading…
Cancel
Save