diff --git a/src/config.rs b/src/config.rs index bb0a76f..dadb181 100644 --- a/src/config.rs +++ b/src/config.rs @@ -42,10 +42,6 @@ pub struct Config { #[arg(long, default_value_t = 20)] pub list_limit: usize, - /// Show crate version in the catalog (tooltip to the GitHub link) - #[arg(long, default_value_t = true)] - pub print_version: bool, - /// Default capacity (estimated torrents in the `preload` directory) #[arg(long, default_value_t = 1000)] pub capacity: usize, diff --git a/src/main.rs b/src/main.rs index c0de8d3..9ea2737 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ pub struct Meta { pub title: String, /// * use vector to keep the order from the arguments list pub trackers: Option>, - pub version: Option, + pub version: String, } #[get("/?")] @@ -140,11 +140,7 @@ fn rocket() -> _ { format_time: config.format_time, title: config.title, trackers: config.tracker, - version: if config.print_version { - Some(env!("CARGO_PKG_VERSION").into()) - } else { - None - }, + version: env!("CARGO_PKG_VERSION").into(), }) .mount("/", FileServer::from(config.statics)) .mount("/", routes![index, rss]) diff --git a/templates/layout/default.html.tera b/templates/layout/default.html.tera index 650d455..0cc8b66 100644 --- a/templates/layout/default.html.tera +++ b/templates/layout/default.html.tera @@ -6,7 +6,7 @@ {% if meta.description %} {% endif %} - +
@@ -20,7 +20,7 @@ \ No newline at end of file