mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-18 05:47:54 +08:00
6219e30609
Refs: #559
25 lines
535 B
Rust
25 lines
535 B
Rust
pub mod account;
|
|
pub mod cli;
|
|
pub mod completion;
|
|
pub mod config;
|
|
pub mod email;
|
|
pub mod folder;
|
|
pub mod manual;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
use shellexpand_utils::{canonicalize, expand};
|
|
|
|
#[doc(inline)]
|
|
pub use crate::email::{envelope, flag, message};
|
|
|
|
/// Parse the given [`str`] as [`PathBuf`].
|
|
///
|
|
/// The path is first shell expanded, then canonicalized (if
|
|
/// applicable).
|
|
fn dir_parser(path: &str) -> Result<PathBuf, String> {
|
|
expand::try_path(path)
|
|
.map(canonicalize::path)
|
|
.map_err(|err| err.to_string())
|
|
}
|