Skip to content

Commit

Permalink
Merge pull request #49 from DanielVoogsgerd/fmt
Browse files Browse the repository at this point in the history
chore(fmt): Update formatter config & run formatter
  • Loading branch information
Lut99 authored Oct 8, 2024
2 parents 78683be + 7aede2b commit e59e50a
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion lib/eflint-to-json/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use console::Style;
use futures_util::StreamExt as _;
use indicatif::{ProgressBar, ProgressStyle};
use log::debug;
use reqwest::{blocking, Client, Request, Response, StatusCode, Url};
use reqwest::{Client, Request, Response, StatusCode, Url, blocking};
use sha2::{Digest as _, Sha256};
use tokio::fs as tfs;
use tokio::io::AsyncWriteExt as _;
Expand Down
2 changes: 1 addition & 1 deletion lib/eflint-to-json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use tokio::fs::{self as tfs, File as TFile};
use tokio::io::{AsyncBufReadExt as _, AsyncReadExt, AsyncWriteExt as _, BufReader as TBufReader};
use tokio::process::{Child as TChild, ChildStdin as TChildStdin, ChildStdout as TChildStdout, Command as TCommand};

use crate::download::{download_file, download_file_async, DownloadSecurity};
use crate::download::{DownloadSecurity, download_file, download_file_async};

/***** CONSTANTS *****/
/// Compiler download URL.
Expand Down
2 changes: 1 addition & 1 deletion lib/srv/src/deliberation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ use policy::{Policy, PolicyDataAccess, PolicyDataError};
use reasonerconn::ReasonerConnector;
use serde::Serialize;
use state_resolver::StateResolver;
use warp::Filter;
use warp::hyper::StatusCode;
use warp::reject::{Reject, Rejection};
use warp::reply::{Json, WithStatus};
use warp::Filter;
use workflow::Workflow;

use crate::Srv;
Expand Down
4 changes: 2 additions & 2 deletions lib/srv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use log::{debug, error, info, warn};
use reasonerconn::ReasonerConnector;
use serde::{Deserialize, Serialize};
use state_resolver::StateResolver;
use tokio::signal::unix::{signal, Signal, SignalKind};
use tokio::signal::unix::{Signal, SignalKind, signal};
use warp::Filter;
use warp::reject::Rejection;
use warp::reply::Reply;
use warp::Filter;

use crate::problem::Problem;

Expand Down
2 changes: 1 addition & 1 deletion lib/srv/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use state_resolver::StateResolver;
use warp::Filter;

use crate::problem::Problem;
use crate::{models, Srv};
use crate::{Srv, models};

impl<L, C, P, S, PA, DA> Srv<L, C, P, S, PA, DA>
where
Expand Down
4 changes: 2 additions & 2 deletions lib/workflow/examples/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ use std::str::FromStr;
use std::sync::Arc;
use std::{error, fs};

use brane_ast::{ast, compile_program, CompileResult, ParserOptions};
use brane_ast::{CompileResult, ParserOptions, ast, compile_program};
use brane_shr::utilities::{create_data_index_from, create_package_index_from};
use clap::Parser;
use enum_debug::EnumDebug;
use error_trace::ErrorTrace as _;
use humanlog::{DebugMode, HumanLogger};
use log::{debug, error, info, Level};
use log::{Level, debug, error, info};
use specifications::data::DataIndex;
use specifications::package::PackageIndex;
use workflow::spec::Workflow;
Expand Down
6 changes: 3 additions & 3 deletions lib/workflow/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ use std::fmt::{Display, Formatter, Result as FResult};
use std::panic::catch_unwind;

use brane_ast::spec::BuiltinFunctions;
use brane_ast::{ast, MergeStrategy};
use brane_ast::{MergeStrategy, ast};
use brane_exe::pc::{ProgramCounter, ResolvedProgramCounter};
use enum_debug::EnumDebug as _;
use log::{debug, trace, Level};
use log::{Level, debug, trace};
use specifications::data::{AvailabilityKind, DataName, PreprocessKind};

use super::preprocess;
use super::spec::{Dataset, Elem, ElemBranch, ElemCommit, ElemLoop, ElemParallel, ElemTask, User, Workflow};
use crate::{utils, Metadata};
use crate::{Metadata, utils};

/***** ERRORS *****/
/// Defines errors that may occur when compiling an [`ast::Workflow`] to a [`Workflow`].
Expand Down
2 changes: 1 addition & 1 deletion lib/workflow/src/eflint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use std::collections::{HashMap, HashSet};
use eflint_json::spec::{ConstructorInput, Expression, ExpressionConstructorApp, ExpressionPrimitive, Phrase, PhraseCreate};
use enum_debug::EnumDebug as _;
use log::{trace, warn};
use rand::distributions::Alphanumeric;
use rand::Rng as _;
use rand::distributions::Alphanumeric;

use crate::spec::{Dataset, Elem, ElemBranch, ElemCommit, ElemLoop, ElemParallel, ElemTask, Metadata, User, Workflow};

Expand Down
4 changes: 2 additions & 2 deletions lib/workflow/src/preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ use std::fmt::{Display, Formatter, Result as FResult};
use std::panic::catch_unwind;
use std::sync::Arc;

use brane_ast::MergeStrategy;
use brane_ast::ast::{Edge, EdgeInstr, FunctionDef, SymTable, TaskDef, Workflow};
use brane_ast::func_id::FunctionId;
use brane_ast::spec::BuiltinFunctions;
use brane_ast::MergeStrategy;
use brane_exe::pc::{ProgramCounter, ResolvedProgramCounter};
use enum_debug::EnumDebug as _;
use log::{debug, trace};
Expand All @@ -36,7 +36,7 @@ mod tests {
use std::path::PathBuf;

use brane_ast::traversals::print::ast;
use brane_ast::{compile_program, CompileResult, ParserOptions};
use brane_ast::{CompileResult, ParserOptions, compile_program};
use brane_shr::utilities::{create_data_index_from, create_package_index_from, test_on_dsl_files_in};
use humanlog::{DebugMode, HumanLogger};
use specifications::data::DataIndex;
Expand Down
2 changes: 1 addition & 1 deletion lib/workflow/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
use std::collections::HashSet;
use std::hash::Hash;

use brane_ast::locations::Location;
use brane_ast::MergeStrategy;
use brane_ast::locations::Location;
use enum_debug::EnumDebug;
use serde::{Deserialize, Serialize};
use specifications::version::Version;
Expand Down
4 changes: 2 additions & 2 deletions lib/workflow/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use std::ffi::OsStr;
use std::path::PathBuf;
use std::sync::Arc;

use brane_ast::{ast, compile_program, CompileResult, ParserOptions};
use brane_ast::{CompileResult, ParserOptions, ast, compile_program};
use brane_shr::utilities::{create_data_index_from, create_package_index_from, test_on_dsl_files_in};
use log::{debug, Level};
use log::{Level, debug};
use specifications::data::DataIndex;
use specifications::package::PackageIndex;

Expand Down
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ max_width = 150
use_small_heuristics = "Max"

# Unstable features below
style_edition = "2024"
unstable_features = true
blank_lines_upper_bound = 5
enum_discrim_align_threshold = 5
Expand All @@ -18,4 +19,3 @@ imports_granularity = "Module"
overflow_delimited_expr = true
reorder_impl_items = true
group_imports = "StdExternalCrate"
version = "Two"
4 changes: 2 additions & 2 deletions src/bin/implementation/posix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ use reasonerconn::{ReasonerConnError, ReasonerConnector, ReasonerResponse};
use serde::Deserialize;
use specifications::data::{DataIndex, Location};
use state_resolver::State;
use workflow::spec::Workflow;
use workflow::utils::{walk_workflow_preorder, WorkflowVisitor};
use workflow::Dataset;
use workflow::spec::Workflow;
use workflow::utils::{WorkflowVisitor, walk_workflow_preorder};

/// This location is an assumption right now, and is needed as long as the location is not passed to the workflow
/// validator.
Expand Down
10 changes: 5 additions & 5 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ use std::fmt::{Display, Formatter, Result as FResult};
use std::fs;
use std::path::PathBuf;

use async_trait::async_trait;
use log::debug;
use nested_cli_parser::map_parser::MapParser;
use nested_cli_parser::{NestedCliParser, NestedCliParserHelpFormatter};
use state_resolver::{State, StateResolver};
#[cfg(feature = "brane-api-resolver")]
use ::{
brane_cfg::info::Info,
Expand All @@ -40,6 +35,11 @@ use ::{
uuid::Uuid,
workflow::{Dataset, User},
};
use async_trait::async_trait;
use log::debug;
use nested_cli_parser::map_parser::MapParser;
use nested_cli_parser::{NestedCliParser, NestedCliParserHelpFormatter};
use state_resolver::{State, StateResolver};

/***** CONSTANTS *****/
/// The list of recognized keys for the arguments of the [`FileStateResolver`].
Expand Down
6 changes: 3 additions & 3 deletions tools/checker-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ use deliberation::spec::{Verdict, WorkflowValidationRequest};
use eflint_json::DisplayEFlint;
use eflint_to_json::compile;
use enum_debug::EnumDebug;
use error_trace::{trace, ErrorTrace as _};
use error_trace::{ErrorTrace as _, trace};
use hmac::{Hmac, Mac as _};
use humanlog::{DebugMode, HumanLogger};
use jwt::SignWithKey as _;
use log::{debug, error, info, trace as trace_log, warn, LevelFilter};
use log::{LevelFilter, debug, error, info, trace as trace_log, warn};
use policy::Policy;
use rand::distributions::Alphanumeric;
use rand::Rng as _;
use rand::distributions::Alphanumeric;
use reqwest::blocking::{Client, Request, Response};
use reqwest::{Method, StatusCode};
use serde_json::value::RawValue;
Expand Down

0 comments on commit e59e50a

Please sign in to comment.