Skip to content

Commit e8b7da1

Browse files
committed
Format code
1 parent 4c714d8 commit e8b7da1

File tree

8 files changed

+10
-16
lines changed

8 files changed

+10
-16
lines changed

.yamllint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
extends: default
33

44
rules:
5-
line-length: disable
5+
line-length: {max: 140}

src/authentication.rs

-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ mod tests {
179179
assert!(path.exists());
180180
let contents = fs::read_to_string(path).unwrap();
181181
assert!(contents.eq("correct_token"));
182-
tmp_dir.close().unwrap();
183182
}
184183

185184
#[test]

src/cli.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ pub fn handle_cli_edge_app_command(command: &EdgeAppCommands) {
910910
#[cfg(test)]
911911
mod tests {
912912

913-
use httpmock::{Method::GET, MockServer};
913+
use httpmock::{Method::GET, MockServer};
914914
use tempfile::tempdir;
915915

916916
use crate::authentication::Config;

src/commands/asset.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl AssetCommand {
8989
.post(url)
9090
.multipart(form)
9191
.headers(headers)
92-
.timeout(Duration::from_secs(3600)) // timeout is equal to server timeout
92+
.timeout(Duration::from_secs(3600)) // timeout is equal to server timeout
9393
.send()?;
9494

9595
if response.status() != StatusCode::CREATED {
@@ -166,7 +166,7 @@ mod tests {
166166
use httpmock::Method::{DELETE, GET, PATCH, POST};
167167
use httpmock::MockServer;
168168

169-
use std::fs;
169+
use std::fs;
170170
use tempfile::tempdir;
171171

172172
#[test]

src/commands/edge_app.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ impl EdgeAppCommand {
682682
.post(url)
683683
.multipart(form)
684684
.headers(headers)
685-
.timeout(Duration::from_secs(3600)) // timeout is equal to server timeout
685+
.timeout(Duration::from_secs(3600)) // timeout is equal to server timeout
686686
.send()?;
687687

688688
let status = response.status();
@@ -740,7 +740,7 @@ mod tests {
740740

741741
use httpmock::Method::{GET, PATCH, POST};
742742
use httpmock::MockServer;
743-
743+
744744
use tempfile::tempdir;
745745

746746
#[test]

src/commands/mod.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ impl Formatter for PlaylistItems {
591591
mod tests {
592592
use super::*;
593593
use tempfile::tempdir;
594-
use std::io::Read;
595594

596595
#[test]
597596
fn test_save_to_file_should_save_yaml_correctly() {
@@ -612,9 +611,7 @@ mod tests {
612611

613612
EdgeAppManifest::save_to_file(&manifest, &file_path).unwrap();
614613

615-
let mut file = File::open(&file_path).unwrap();
616-
let mut contents = String::new();
617-
file.read_to_string(&mut contents).unwrap();
614+
let contents = fs::read_to_string(file_path).unwrap();
618615

619616
let expected_contents = r#"---
620617
app_id: test_app
@@ -633,7 +630,5 @@ settings:
633630
"#;
634631

635632
assert_eq!(contents, expected_contents);
636-
637-
dir.close().unwrap();
638633
}
639-
}
634+
}

src/commands/screen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ mod tests {
7575

7676
use crate::authentication::{Authentication, Config};
7777
use crate::commands::{Formatter, OutputType};
78-
use serde_json::{json, Value};
78+
use serde_json::{json, Value};
7979
use tempfile::tempdir;
8080

8181
#[test]

src/signature.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub fn checksum(chunk: &[u8]) -> Vec<u8> {
6060
#[cfg(test)]
6161
mod tests {
6262
use super::*;
63-
use std::fs;
63+
use std::fs;
6464
use tempfile::tempdir;
6565

6666
#[test]

0 commit comments

Comments
 (0)