~/selfhut

616316d37280990bf25319f1b844072a5074d701 — Arthur Melton 908afdb7 2 years ago
fix some errors
5 files changed, 19 insertions(+), 19 deletions(-)

M src/clone.rs
M src/main.rs
M src/repository/raw.rs
M src/repository/summary.rs
M src/repository/tree.rs
M src/clone.rs => src/clone.rs +1 -1
@@ 1,7 1,7 @@

use rocket::fs::NamedFile;
use crate::config::CONFIG;
use crate::PathBufWithDotfiles;
use std::path::Path;


#[get("/<repo>/<path..>", rank=3)]
pub async fn clone(repo: String, path: PathBufWithDotfiles) -> Option<NamedFile> {

M src/main.rs => src/main.rs +1 -1
@@ 9,7 9,7 @@ mod clone;

use utils::config;

use rocket::fs::relative;
use rocket::fs::FileServer;

use rocket_dyn_templates::Template;
use crate::repository::summary;
use crate::repository::tree;

M src/repository/raw.rs => src/repository/raw.rs +13 -13
@@ 1,17 1,17 @@

use rocket_dyn_templates::{context, Template};
use crate::config::CONFIG;
use crate::utils::repo_config::repo_config;
use crate::git::commits::get_commits;
use crate::git::main_branch::main_branch;
use crate::git::file::{files, file};





use crate::git::file::{file};
use crate::PathBufWithDotfiles;
use std::ffi::OsStr;
use syntect::easy::HighlightLines;
use syntect::parsing::SyntaxSet;
use syntect::highlighting::{ThemeSet, Style};
use syntect::util::LinesWithEndings;
use syntect::html::highlighted_html_for_string;
use std::path::Path;








#[get("/<repo>/blob/<branch>/<location..>", rank=2)]
pub fn raw(repo: String, branch: String, location: PathBufWithDotfiles) -> Option<Vec<u8>> {

M src/repository/summary.rs => src/repository/summary.rs +1 -1
@@ 1,6 1,6 @@

use rocket_dyn_templates::{context, Template};
use crate::config::CONFIG;
use std::fs;

use crate::utils::markdown::md_to_html;
use crate::utils::repo_config::repo_config;
use crate::git::commits::get_commits;

M src/repository/tree.rs => src/repository/tree.rs +3 -3
@@ 6,10 6,10 @@ use crate::git::main_branch::main_branch;

use crate::git::file::{files, file};
use crate::PathBufWithDotfiles;
use std::ffi::OsStr;
use syntect::easy::HighlightLines;

use syntect::parsing::SyntaxSet;
use syntect::highlighting::{ThemeSet, Style};
use syntect::util::LinesWithEndings;
use syntect::highlighting::{ThemeSet};

use syntect::html::highlighted_html_for_string;
use std::path::Path;