vig 0.3.0

Git TUI side-by-side diff viewer
1
2
3
4
5
6
7
8
9
10
use crate::core::app::Page;
use crate::core::config::Config;
use crate::files::state::FilesState;
use anyhow::Result;
use std::path::Path;

/// Create the Files page rooted at `root` (the repository working directory).
pub fn new_page(root: &Path, cfg: &Config) -> Result<Page> {
    Ok(Page::new(FilesState::new(root, cfg)?))
}