💾 Archived View for lists.flounder.online › patches › threads › 20210321155513.1389-3-johann@qwertqw… captured on 2022-04-28 at 19:24:35. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
From: johann@qwertqwefsday.eu
Date: Sun, 21 Mar 2021 16:55:13 +0100
Message-Id: 20210321155513.1389-3-johann@qwertqwefsday.eu
To: <~aw/patches@lists.sr.ht>
In-Reply-To: 20210321155513.1389-1-johann@qwertqwefsday.eu
Cc: "Johann150" <johann@qwertqwefsday.eu>
--------------------------------------
From: Johann150 <johann@qwertqwefsday.eu>
---
src/main.rs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index d2f390a..7bbc287 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,16 +1,15 @@
use anyhow::Result;
use askama::Template;
use git2::{
- Commit, Diff, DiffDelta, DiffFormat, Object, Oid, Reference, Repository, Tree, TreeEntry,
+ Commit, Diff, DiffDelta, Reference, Repository, Tree, TreeEntry,
};
use once_cell::sync::Lazy;
-use pico_args;
use serde::Deserialize;
use std::fs;
use std::path::Path;
use std::str;
-use syntect::highlighting::{Color, ThemeSet};
-use syntect::parsing::{SyntaxReference, SyntaxSet};
+use syntect::highlighting::ThemeSet;
+use syntect::parsing::SyntaxSet;
use tide::Request;
#[derive(Deserialize, Debug)]
@@ -79,7 +78,7 @@ fn args() -> Config {
let config_filename = pargs
.opt_value_from_str(["-c", "--config"])
.unwrap()
- .unwrap_or("mygit.toml".to_string());
+ .unwrap_or_else(|| "mygit.toml".to_string());
let toml_text = fs::read_to_string(&config_filename).unwrap_or_else(|_| {
tide::log::warn!(
--
2.20.1
From: alex@alexwennerberg.com
Date: Sun, 21 Mar 2021 09:55:08 -0700
Message-Id: CA36QFRCINZN.FEBX3NX5AM4N@debian-alex
To: "Johann Galle" <johann@qwertqwefsday.eu>, <~aw/patches@lists.sr.ht>
In-Reply-To: 20210321155513.1389-3-johann@qwertqwefsday.eu
--------------------------------------
Thank you!
On Sun Mar 21, 2021 at 8:55 AM PDT, Johann Galle wrote:
From: Johann150 <johann@qwertqwefsday.eu>
---
src/main.rs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index d2f390a..7bbc287 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,16 +1,15 @@
use anyhow::Result;
use askama::Template;
use git2::{
- Commit, Diff, DiffDelta, DiffFormat, Object, Oid, Reference,
Repository, Tree, TreeEntry,
+ Commit, Diff, DiffDelta, Reference, Repository, Tree, TreeEntry,
};
use once_cell::sync::Lazy;
-use pico_args;
use serde::Deserialize;
use std::fs;
use std::path::Path;
use std::str;
-use syntect::highlighting::{Color, ThemeSet};
-use syntect::parsing::{SyntaxReference, SyntaxSet};
+use syntect::highlighting::ThemeSet;
+use syntect::parsing::SyntaxSet;
use tide::Request;
#[derive(Deserialize, Debug)]
@@ -79,7 +78,7 @@ fn args() -> Config {
let config_filename = pargs
.opt_value_from_str(["-c", "--config"])
.unwrap()
- .unwrap_or("mygit.toml".to_string());
+ .unwrap_or_else(|| "mygit.toml".to_string());
let toml_text = fs::read_to_string(&config_filename).unwrap_or_else(|_|
{
tide::log::warn!(
--
2.20.1