Skip to content

Commit 2c354e8

Browse files
committed
Format
1 parent adb0d0b commit 2c354e8

File tree

8 files changed

+20
-14
lines changed

8 files changed

+20
-14
lines changed

src/cargo-about/clarify.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ pub fn cmd(args: Args) -> anyhow::Result<()> {
135135
};
136136

137137
if contents.contains('\r') {
138-
log::warn!("{} contains CRLF line endings, the checksums will be calculated with normal LF line endings to match checksum verification", args.path);
138+
log::warn!(
139+
"{} contains CRLF line endings, the checksums will be calculated with normal LF line endings to match checksum verification",
140+
args.path
141+
);
139142
}
140143

141144
let license_store = cargo_about::licenses::store_from_cache()?;

src/cargo-about/generate.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ pub fn cmd(args: Args, color: crate::Color) -> anyhow::Result<()> {
182182
let redirect_stdout =
183183
args.output_file.is_none() || args.output_file.as_deref() == Some(Path::new("-"));
184184
if redirect_stdout {
185-
anyhow::ensure!(!cargo_about::is_powershell_parent(), "cargo-about should not redirect its output in powershell, please use the -o, --output-file option to redirect to a file to avoid powershell encoding issues");
185+
anyhow::ensure!(
186+
!cargo_about::is_powershell_parent(),
187+
"cargo-about should not redirect its output in powershell, please use the -o, --output-file option to redirect to a file to avoid powershell encoding issues"
188+
);
186189
}
187190

188191
rayon::scope(|s| {

src/licenses/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use krates::Utf8PathBuf as PathBuf;
2-
use serde::{de, ser, Deserialize, Serialize};
2+
use serde::{Deserialize, Serialize, de, ser};
33
use spdx::Expression;
44
use std::{collections::BTreeMap, fmt};
55

src/licenses/fetch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{config, Krate};
1+
use super::{Krate, config};
22
use anyhow::Context as _;
33
use krates::Utf8Path as Path;
44
use reqwest::blocking::Client;

src/licenses/resolution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
2-
licenses::{config, KrateLicense, LicenseInfo},
32
Krate,
3+
licenses::{KrateLicense, LicenseInfo, config},
44
};
55
use spdx::{Expression, LicenseReq, Licensee};
66
use std::fmt;

src/licenses/workarounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::licenses::{
2+
KrateLicense,
23
config::{Clarification, ClarificationFile, Config},
34
fetch::GitCache,
4-
KrateLicense,
55
};
66

77
mod bitvec;

tests/cli/generate.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ fn reports_no_licenses_when_manifest_has_license_file_field_with_non_spdx_text()
251251
}
252252

253253
#[test]
254-
fn reports_custom_spdx_license_text_when_manifest_has_license_file_field_with_spdx_text(
255-
) -> Result<()> {
254+
fn reports_custom_spdx_license_text_when_manifest_has_license_file_field_with_spdx_text()
255+
-> Result<()> {
256256
let license_text = mit_license_text("2022", "Big Birdz");
257257

258258
let package = Package::builder()
@@ -278,8 +278,8 @@ fn reports_custom_spdx_license_text_when_manifest_has_license_file_field_with_sp
278278
}
279279

280280
#[test]
281-
fn reports_no_licenses_when_manifest_has_license_file_field_with_spdx_license_text_and_non_std_filename(
282-
) -> Result<()> {
281+
fn reports_no_licenses_when_manifest_has_license_file_field_with_spdx_license_text_and_non_std_filename()
282+
-> Result<()> {
283283
let license_text = mit_license_text("2022", "Big Birdz");
284284

285285
let package = Package::builder()
@@ -311,8 +311,8 @@ fn reports_no_licenses_when_manifest_has_license_file_field_with_spdx_license_te
311311
}
312312

313313
#[test]
314-
fn reports_custom_spdx_license_file_when_spdx_license_file_has_std_naming_but_not_specifed_in_manifest(
315-
) -> Result<()> {
314+
fn reports_custom_spdx_license_file_when_spdx_license_file_has_std_naming_but_not_specifed_in_manifest()
315+
-> Result<()> {
316316
let license_content = mit_license_text("2022", "Big Birdz");
317317

318318
let package = Package::builder()

tests/utils/package.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use anyhow::{anyhow, Result};
2-
use assert_fs::prelude::*;
1+
use anyhow::{Result, anyhow};
32
use assert_fs::TempDir;
3+
use assert_fs::prelude::*;
44
use std::collections::HashMap;
55
use std::collections::HashSet;
66
use std::fmt::Debug;

0 commit comments

Comments
 (0)