Skip to content

Commit c83287c

Browse files
committed
cargo +stable fmt
1 parent 1c310d2 commit c83287c

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

cli/build.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ fn main() {
3333

3434
let mut store = Store::new();
3535
store
36-
.load_spdx(Path::new("../datasets/modules/spdx-license-list-data/json/details"), store_texts)
36+
.load_spdx(
37+
Path::new("../datasets/modules/spdx-license-list-data/json/details"),
38+
store_texts,
39+
)
3740
.expect("Couldn't create a store from SPDX data. Have submodules been initialized?");
3841
let mut cache = File::create(EMBEDDED_CACHE).unwrap();
3942
store.to_cache(&mut cache).unwrap();

examples/basic.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ fn main() {
1616
println!("Loading SPDX data, this may take a while...");
1717
store
1818
.load_spdx(
19-
Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/datasets/modules/spdx-license-list-data/json/details")),
19+
Path::new(concat!(
20+
env!("CARGO_MANIFEST_DIR"),
21+
"/datasets/modules/spdx-license-list-data/json/details"
22+
)),
2023
false,
2124
)
2225
.unwrap();

extras/lambda/src/main.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ pub fn handler(e: Request, _c: Context) -> Result<impl IntoResponse, HandlerErro
2626

2727
return Ok(Response::builder()
2828
.status(200)
29-
.body(format!(
30-
"{}\n{}\n",
31-
result.name,
32-
result.score,
33-
))
29+
.body(format!("{}\n{}\n", result.name, result.score,))
3430
.unwrap());
3531
}
36-
Ok(Response::builder().status(400).body("uh oh".to_string()).unwrap())
32+
Ok(Response::builder()
33+
.status(400)
34+
.body("uh oh".to_string())
35+
.unwrap())
3736
}

extras/wasm/build.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ fn main() {
2525

2626
let mut store = Store::new();
2727
store
28-
.load_spdx(Path::new("../../datasets/modules/spdx-license-list-data/json/details"), true)
28+
.load_spdx(
29+
Path::new("../../datasets/modules/spdx-license-list-data/json/details"),
30+
true,
31+
)
2932
.expect("Couldn't create a store from SPDX data. Have submodules been initialized?");
3033
let mut cache = File::create(EMBEDDED_CACHE).unwrap();
3134
store.to_cache(&mut cache).unwrap();

tests/common/mod.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ use std::path::Path;
77
use askalono::Store;
88

99
#[allow(dead_code)]
10-
pub const SPDX_TEXT: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/datasets/modules/spdx-license-list-data/text");
11-
pub const SPDX_JSON: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/datasets/modules/spdx-license-list-data/json/details");
10+
pub const SPDX_TEXT: &str = concat!(
11+
env!("CARGO_MANIFEST_DIR"),
12+
"/datasets/modules/spdx-license-list-data/text"
13+
);
14+
pub const SPDX_JSON: &str = concat!(
15+
env!("CARGO_MANIFEST_DIR"),
16+
"/datasets/modules/spdx-license-list-data/json/details"
17+
);
1218
pub const TEST_CACHE: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/test-cache.bin.zstd");
1319

1420
pub fn load_store() -> Store {

0 commit comments

Comments
 (0)