Skip to content

Commit 99bff66

Browse files
committed
bump to edition 2018 to enable async/await syntax #185
1 parent bbc0359 commit 99bff66

File tree

4 files changed

+18
-24
lines changed

4 files changed

+18
-24
lines changed

Diff for: Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[package]
2+
edition = "2018"
23
name = "onefetch"
34
description = "Git repository summary on your terminal"
45
version = "2.3.0"

Diff for: src/info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use std::fmt::Write;
33
use std::fs;
44
use std::process::Command;
55

6+
use crate::license::Detector;
67
use colored::{Color, ColoredString, Colorize};
78
use git2::Repository;
89
use image::DynamicImage;
9-
use license::Detector;
1010

1111
use crate::image_backends::ImageBackend;
1212
use crate::language::Language;

Diff for: src/language.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,7 @@ impl Language {
267267
Language::Assembly => vec![Color::Cyan],
268268
Language::C => vec![Color::Cyan, Color::Blue],
269269
Language::Clojure => vec![Color::Cyan, Color::Green],
270-
Language::CMake => vec![
271-
Color::Blue,
272-
Color::Green,
273-
Color::Red,
274-
Color::Black,
275-
],
270+
Language::CMake => vec![Color::Blue, Color::Green, Color::Red, Color::Black],
276271
Language::CoffeeScript => vec![Color::Red],
277272
Language::Cpp => vec![Color::Cyan, Color::Blue],
278273
Language::Csharp => vec![Color::Blue, Color::Magenta],

Diff for: src/main.rs

+15-17
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,9 @@ fn main() -> Result<()> {
113113
.version(crate_version!())
114114
.author("o2sh <[email protected]>")
115115
.about(crate_description!())
116-
.arg(
117-
Arg::with_name("input")
118-
.default_value(".")
119-
.help("Run as if onefetch was started in <input> instead of the current working directory.")
120-
)
116+
.arg(Arg::with_name("input").default_value(".").help(
117+
"Run as if onefetch was started in <input> instead of the current working directory.",
118+
))
121119
.arg(
122120
Arg::with_name("ascii-language")
123121
.short("a")
@@ -145,7 +143,7 @@ fn main() -> Result<()> {
145143
.take(InfoFields::count() - 1)
146144
.map(|field| field.into())
147145
.collect::<Vec<&str>>()
148-
.as_slice()
146+
.as_slice(),
149147
),
150148
)
151149
.arg(
@@ -170,12 +168,12 @@ fn main() -> Result<()> {
170168
"6".cyan(),
171169
"7".white()
172170
)),
173-
)
174-
.arg(
175-
Arg::with_name("no-bold")
176-
.long("no-bold")
177-
.help("Turns off bold formatting."),
178-
)
171+
)
172+
.arg(
173+
Arg::with_name("no-bold")
174+
.long("no-bold")
175+
.help("Turns off bold formatting."),
176+
)
179177
.arg(
180178
Arg::with_name("languages")
181179
.short("l")
@@ -216,11 +214,11 @@ fn main() -> Result<()> {
216214
)
217215
.arg(
218216
Arg::with_name("exclude")
219-
.short("e")
220-
.long("exclude")
221-
.multiple(true)
222-
.takes_value(true)
223-
.help("Ignore all files & directories matching the pattern.")
217+
.short("e")
218+
.long("exclude")
219+
.multiple(true)
220+
.takes_value(true)
221+
.help("Ignore all files & directories matching the pattern."),
224222
)
225223
.get_matches();
226224

0 commit comments

Comments
 (0)