Skip to content

Commit 06d58db

Browse files
authored
Merge pull request #127 from portgasd666/master
Bump license from 0.7.1 to 0.8.1
2 parents 3bfe441 + fd5f13c commit 06d58db

File tree

3 files changed

+7
-24
lines changed

3 files changed

+7
-24
lines changed

Cargo.lock

Lines changed: 3 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exclude = ["assets/*.png"]
1212
colored= "1.8.0"
1313
git2 = {version = "0.7.5", default-features = false}
1414
tokei = "10.0"
15-
license = "0.7.1"
15+
license = "0.8.1"
1616
bytecount = "0.5.1"
1717
clap = "2.33.0"
1818
strum = "0.16.0"

src/info.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ use std::ffi::OsStr;
22
use std::fmt::Write;
33
use std::fs;
44
use std::process::Command;
5-
use std::str::FromStr;
65

76
use colored::{Color, Colorize, ColoredString};
87
use git2::Repository;
9-
use license::License;
8+
use license;
109
use image::DynamicImage;
1110

1211
use crate::language::Language;
@@ -530,10 +529,9 @@ impl Info {
530529
.is_empty())
531530
}, // TODO: multiple prefixes, like COPYING?
532531
)
533-
.map(|entry| {
534-
license::Kind::from_str(&fs::read_to_string(entry).unwrap_or_else(|_| "".into()))
532+
.filter_map(|entry| {
533+
license::from_text_ext(&fs::read_to_string(entry).unwrap_or_else(|_| "".into()))
535534
})
536-
.filter_map(std::result::Result::ok)
537535
.map(|license| license.name().to_string())
538536
.collect::<Vec<_>>()
539537
.join(", ");

0 commit comments

Comments
 (0)