~/selfhut

532ca61639f151ebd357606d605db2bbb5ab6a51 — Arthur Melton 66cb4022 2 years ago
format
2 files changed, 3 insertions(+), 3 deletions(-)

M src/main.rs
M src/utils/repo_config.rs
M src/main.rs => src/main.rs +1 -1
@@ 8,8 8,8 @@ mod utils;


use utils::config;

use std::path::Path;
use rocket::fs::relative;
use std::path::Path;

use crate::repository::raw;
use crate::repository::summary;

M src/utils/repo_config.rs => src/utils/repo_config.rs +2 -2
@@ 1,12 1,12 @@

use serde_derive::{Deserialize, Serialize};
use crate::git::file::file;
use crate::git::main_branch::main_branch;
use serde_derive::{Deserialize, Serialize};

pub fn repo_config(repo: String) -> RepoConfig {
    let main_branch = main_branch(repo.clone()).unwrap_or("".to_string());
    let content = match file(repo.clone(), main_branch.clone(), "repo.toml".to_string()) {
        Some(file) => file.1.unwrap_or("".to_string()),
        None => "".to_string()
        None => "".to_string(),
    };
    match toml::from_str(&content) {
        Ok(x) => x,