core: Implement `Display` for `NavigationMethod`
This commit is contained in:
parent
711a012fea
commit
7d7fe1bfdd
|
@ -3,6 +3,7 @@
|
|||
use crate::loader::Error;
|
||||
use crate::string::WStr;
|
||||
use indexmap::IndexMap;
|
||||
use std::fmt;
|
||||
use std::future::Future;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::pin::Pin;
|
||||
|
@ -40,6 +41,16 @@ impl NavigationMethod {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for NavigationMethod {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let method = match self {
|
||||
Self::Get => "GET",
|
||||
Self::Post => "POST",
|
||||
};
|
||||
f.write_str(method)
|
||||
}
|
||||
}
|
||||
|
||||
/// A fetch request.
|
||||
pub struct Request {
|
||||
/// The URL of the request.
|
||||
|
|
Loading…
Reference in New Issue